Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/locale when loading all locale categories (called w...



details:   https://anonhg.NetBSD.org/src/rev/4633ef5d3bf9
branches:  trunk
changeset: 477212:4633ef5d3bf9
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri Oct 15 17:17:07 1999 +0000

description:
when loading all locale categories (called with LC_ALL), ignore if
loadlocale() fails - since only LC_CTYPE is implemented and all
other categories return error, code never got to actually
load the ctype locales, as first category tried was LC_COLLATE
and it always failed

diffstat:

 lib/libc/locale/setlocale.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 47c4ad33ddb8 -r 4633ef5d3bf9 lib/libc/locale/setlocale.c
--- a/lib/libc/locale/setlocale.c       Fri Oct 15 17:01:19 1999 +0000
+++ b/lib/libc/locale/setlocale.c       Fri Oct 15 17:17:07 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: setlocale.c,v 1.16 1998/11/13 15:49:04 christos Exp $  */
+/*     $NetBSD: setlocale.c,v 1.17 1999/10/15 17:17:07 jdolecek Exp $  */
 
 /*
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)setlocale.c        8.1 (Berkeley) 7/4/93";
 #else
-__RCSID("$NetBSD: setlocale.c,v 1.16 1998/11/13 15:49:04 christos Exp $");
+__RCSID("$NetBSD: setlocale.c,v 1.17 1999/10/15 17:17:07 jdolecek Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -183,8 +183,7 @@
                return (loadlocale(category));
 
        for (i = 1; i < _LC_LAST; ++i)
-               if (loadlocale(i) == NULL)
-                       return (NULL);
+               (void) loadlocale(i);
 
        return (currentlocale());
 }



Home | Main Index | Thread Index | Old Index