libctf: Pass format argument to asprintf
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 24 Nov 2020 14:08:43 +0000 (14:08 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Wed, 25 Nov 2020 19:11:36 +0000 (19:11 +0000)
libctf/ChangeLog
2020-09-23  H.J. Lu  <hongjiu.lu@intel.com>

PR libctf/26934
* ctf-dump.c (ctf_dump_objts): Pass format argument to asprintf.

libctf/ChangeLog
libctf/ctf-dump.c

index adeedeb9249ab25f60b88282724d5b4abc10fe2c..f12c88acfa25acc7c8318d3b971cf642236d63e4 100644 (file)
@@ -1,3 +1,8 @@
+2020-09-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR libctf/26934
+       * ctf-dump.c (ctf_dump_objts): Pass format argument to asprintf.
+
 2020-11-23  Nick Alcock  <nick.alcock@oracle.com>
 
        * ctf-impl.h (ctf_dict_t) <ctf_symtab_little_endian>: New.
index ccf4b3cb2b887acb192b0960b2dc46a79a1484bc..b0de345da32df81a3c6bc1fae13282cc5a6b7386 100644 (file)
@@ -403,7 +403,7 @@ ctf_dump_objts (ctf_dict_t *fp, ctf_dump_state_t *state, int functions)
              goto out;
            }
 
-         if (asprintf (&typestr, ctf_errmsg (ctf_errno (fp))) < 0)
+         if (asprintf (&typestr, _("error: %s"), ctf_errmsg (ctf_errno (fp))) < 0)
            goto oom;
 
          err = -1;