From 12b92015dd7ac9b55b3cca3348545fbfb0a7ec5d Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 4 Sep 2000 03:43:24 +0000 Subject: [PATCH] The comparison against 0 should be against LC_ALL. category isn't a boolean and it is LC_ALL that's special. Someone submitted this to me a long time ago, but I can't find the mail now. --- lib/libc/locale/setlocale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index f5f5fae472cb..daea2bc17513 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -173,7 +173,7 @@ setlocale(category, locale) } } - if (category) + if (category != LC_ALL) return (loadlocale(category)); for (i = 1; i < _LC_LAST; ++i) {