public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [COMMITTED] readelf: Lookup "no" translation for no_str, not "yes".
Date: Thu, 07 Jun 2018 18:06:00 -0000	[thread overview]
Message-ID: <20180607180610.25456-1-mark@klomp.org> (raw)

On irc Tom pointed out that no was yes... oops.
Committed as obvious.

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 | 6 ++++++
 src/readelf.c | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 37e24714..d6fc919a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/readelf.c b/src/readelf.c
index 8f37f17b..6ac45111 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -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:
-- 
2.17.0

                 reply	other threads:[~2018-06-07 18:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180607180610.25456-1-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).