diff options
author | Moritz Jodeit <moritz@cvs.openbsd.org> | 2007-09-06 08:26:13 +0000 |
---|---|---|
committer | Moritz Jodeit <moritz@cvs.openbsd.org> | 2007-09-06 08:26:13 +0000 |
commit | f16875338fbe22954a0a20d090d4e378c227e8a2 (patch) | |
tree | 9b11302a5f306a4a271994d7e275d5d4900e9655 | |
parent | 47262e2d33ab712b068ff95f285a7507eaea6669 (diff) |
_xpg4_setrunelocale() returns an errno(2) value in the failure
case and 0 if the locale was found. So checking against -1 makes
no sense.
ok millert@
-rw-r--r-- | lib/libc/locale/setlocale.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index 9587ecca56d..1463ed4184a 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setlocale.c,v 1.14 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: setlocale.c,v 1.15 2007/09/06 08:26:12 moritz Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -243,7 +243,7 @@ load_locale_sub(int category, const char *locname, int isspecial) switch (category) { case LC_CTYPE: - if (_xpg4_setrunelocale(locname) == -1) + if (_xpg4_setrunelocale(locname)) return -1; __install_currentrunelocale_ctype(); break; |