diff options
author | ache <ache@FreeBSD.org> | 2000-09-01 11:09:34 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2000-09-01 11:09:34 +0000 |
commit | fea9bbdd8546b0c87c2f1333f91f7a515acef161 (patch) | |
tree | d45a7fad70a73966d885638cbe4b6f0deb1262a1 /lib/libc | |
parent | c023c260fca236fad832b9e5c52f39ad6ec597d8 (diff) | |
download | FreeBSD-src-fea9bbdd8546b0c87c2f1333f91f7a515acef161.zip FreeBSD-src-fea9bbdd8546b0c87c2f1333f91f7a515acef161.tar.gz |
Move protection code down to handle NL_CAT_LOCALE case too.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/nls/msgcat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index 5632ad3..4dba0cd 100644 --- a/lib/libc/nls/msgcat.c +++ b/lib/libc/nls/msgcat.c @@ -108,10 +108,11 @@ int type; if (type == NL_CAT_LOCALE) lang = setlocale(LC_MESSAGES, NULL); else { - if ((lang = (char *) getenv("LANG")) == NULL || - strchr(lang, '/') != NULL) + if ((lang = (char *) getenv("LANG")) == NULL) lang = "C"; } + if (strchr(lang, '/') != NULL) + lang = "C"; if ((nlspath = (char *) getenv("NLSPATH")) == NULL #ifndef __NETBSD_SYSCALLS || issetugid() |