summaryrefslogtreecommitdiffstats
path: root/src/readelf.c
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-03-07 11:16:13 +0100
committerUlf Hermann <[email protected]>2017-04-21 15:47:49 +0000
commit948852f9b694abfda2fc380daf3007e73abe9288 (patch)
tree69689740fab723e7a97336932e049e2042b491ee /src/readelf.c
parentf8b7e5a0cc31d2b101bc6be28842e37f2d14e81a (diff)
Avoid YESSTR and NOSTR
Those are deprecated and apparently some implementations of nl_langinfo return empty strings for them. The tests even tested for those empty strings even though the intention of the code was clearly to output "yes" or "no" there. Change-Id: I4a0a24df2e9b5ac14a7eb6028f89c408b8a8aac7 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/readelf.c')
-rw-r--r--src/readelf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/readelf.c b/src/readelf.c
index 97a43b06..6f6095d2 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -6132,7 +6132,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
printf (" %*s%-20s (%s) %s\n",
(int) (level * 2), "", dwarf_attr_name (attr),
- dwarf_form_name (form), nl_langinfo (flag ? YESSTR : NOSTR));
+ dwarf_form_name (form), flag ? gettext ("yes") : gettext ("no"));
break;
case DW_FORM_flag_present:
@@ -6140,7 +6140,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
break;
printf (" %*s%-20s (%s) %s\n",
(int) (level * 2), "", dwarf_attr_name (attr),
- dwarf_form_name (form), nl_langinfo (YESSTR));
+ dwarf_form_name (form), gettext ("yes"));
break;
case DW_FORM_exprloc:
@@ -7650,7 +7650,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
if (readp + 1 > readendp)
goto invalid_data;
val = *readp++;
- printf (" %s", nl_langinfo (val != 0 ? YESSTR : NOSTR));
+ printf (" %s", val != 0 ? gettext ("yes") : gettext ("no"));
break;
case DW_FORM_string: