summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-02-12 17:06:35 +0000
committerUlrich Drepper <drepper@redhat.com>2004-02-12 17:06:35 +0000
commit02860e478169f80f2ce15d58703929ac6ad7e4b0 (patch)
treee593180c56188956c60d9391a9a14a6e2c938925 /locale
parent6c2a04a7e8a1e4c8fb69442eab126e9f275b785b (diff)
downloadglibc-02860e478169f80f2ce15d58703929ac6ad7e4b0.tar.gz
glibc-02860e478169f80f2ce15d58703929ac6ad7e4b0.tar.xz
glibc-02860e478169f80f2ce15d58703929ac6ad7e4b0.zip
Update.
2004-02-12  Ulrich Drepper  <drepper@redhat.com>

	* locale/programs/locale.c (show_locale_vars): Don't print a value
	for LANG if it is not set.
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/locale.c5
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);
     }