]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
readelf: Lookup "no" translation for no_str, not "yes".
authorMark Wielaard <mark@klomp.org>
Thu, 7 Jun 2018 17:42:43 +0000 (19:42 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 7 Jun 2018 17:42:49 +0000 (19:42 +0200)
Also use yes_str and no_str in print_debug_abbrev_section
and print_form_data.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c

index 37e24714e5cdb60623af4e86ddf7eec27e35a70f..d6fc919aa4c6c7e728f68129bc46834b78508a4b 100644 (file)
@@ -1,3 +1,9 @@
+2018-06-07  Mark Wielaard  <mark@klomp.org>
+
+       * readelf.c (main): Lookup "no" for no_str.
+       (print_debug_abbrev_section): Use yes_str and no_str.
+       (print_form_data): Likewise.
+
 2018-06-04  Mark Wielaard  <mark@klomp.org>
 
        * readelf (format_result): New static char pointer.
index 8f37f17bcbc07e6f9121ac400c5e22aa6bbdfcd8..6ac45111c2efe3518be60d3599b1df7eb6c9d607 100644 (file)
@@ -327,7 +327,7 @@ main (int argc, char *argv[])
 
   /* Look up once.  */
   yes_str = gettext ("yes");
-  no_str = gettext ("yes");
+  no_str = gettext ("no");
 
   /* Parse and process arguments.  */
   int remaining;
@@ -5062,7 +5062,7 @@ print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
          printf (gettext (" [%5u] offset: %" PRId64
                           ", children: %s, tag: %s\n"),
                  code, (int64_t) offset,
-                 has_children ? gettext ("yes") : gettext ("no"),
+                 has_children ? yes_str : no_str,
                  dwarf_tag_name (tag));
 
          size_t cnt = 0;
@@ -7955,7 +7955,7 @@ print_form_data (Dwarf *dbg, int form, const unsigned char *readp,
       if (readendp - readp < 1)
        goto invalid_data;
       val = *readp++;
-      printf ("%s", val != 0 ? gettext ("yes") : gettext ("no"));
+      printf ("%s", val != 0 ? yes_str : no_str);
       break;
 
     case DW_FORM_string: