diff options
Diffstat (limited to 'locale/programs/locale.c')
-rw-r--r-- | locale/programs/locale.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 971fd361ed..92be8e231a 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -769,7 +769,7 @@ show_locale_vars (void) { size_t cat_no; const char *lcall = getenv ("LC_ALL"); - const char *lang = getenv ("LANG") ? : "POSIX"; + const char *lang = getenv ("LANG") ? : ""; auto void get_source (const char *name); @@ -778,7 +778,8 @@ show_locale_vars (void) char *val = getenv (name); if ((lcall ?: "")[0] != '\0' || val == NULL) - printf ("%s=\"%s\"\n", name, (lcall ?: "")[0] ? lcall : lang); + printf ("%s=\"%s\"\n", name, + (lcall ?: "")[0] ? lcall : (lang ?: "")[0] ? lang : "POSIX"); else printf ("%s=%s\n", name, val); } |