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.
This commit is contained in:
Warner Losh 2000-09-04 03:43:24 +00:00
parent 71300cb5db
commit 12b92015dd

View File

@ -173,7 +173,7 @@ setlocale(category, locale)
} }
} }
if (category) if (category != LC_ALL)
return (loadlocale(category)); return (loadlocale(category));
for (i = 1; i < _LC_LAST; ++i) { for (i = 1; i < _LC_LAST; ++i) {