summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2000-09-01 11:13:38 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2000-09-01 11:13:38 +0000
commit460b9262851d28c58d749236b35737f8313e84f8 (patch)
tree177fd85f997fb051ed137791ce7ce139f69a7659 /lib/libc
parent016de69d9e19269b66164f885ede3f4f62d0af98 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/nls/msgcat.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c
index 4dba0cdab529..f02af8e0ae4c 100644
--- a/lib/libc/nls/msgcat.c
+++ b/lib/libc/nls/msgcat.c
@@ -107,11 +107,9 @@ int type;
} else {
if (type == NL_CAT_LOCALE)
lang = setlocale(LC_MESSAGES, NULL);
- else {
- if ((lang = (char *) getenv("LANG")) == NULL)
- lang = "C";
- }
- if (strchr(lang, '/') != NULL)
+ else
+ lang = getenv("LANG");
+ if (lang == NULL || strchr(lang, '/') != NULL)
lang = "C";
if ((nlspath = (char *) getenv("NLSPATH")) == NULL
#ifndef __NETBSD_SYSCALLS