Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/locale remove an obstructive ?: operator of the che...
details: https://anonhg.NetBSD.org/src/rev/5595dbe3d1da
branches: trunk
changeset: 534748:5595dbe3d1da
user: tshiozak <tshiozak%NetBSD.org@localhost>
date: Fri Aug 02 12:27:32 2002 +0000
description:
remove an obstructive ?: operator of the check added in the last commit by
itojun-san.
diffstat:
lib/libc/locale/setlocale.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r 9c962940e5f7 -r 5595dbe3d1da lib/libc/locale/setlocale.c
--- a/lib/libc/locale/setlocale.c Fri Aug 02 11:49:18 2002 +0000
+++ b/lib/libc/locale/setlocale.c Fri Aug 02 12:27:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setlocale.c,v 1.39 2002/08/02 08:02:36 itojun Exp $ */
+/* $NetBSD: setlocale.c,v 1.40 2002/08/02 12:27:32 tshiozak 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.39 2002/08/02 08:02:36 itojun Exp $");
+__RCSID("$NetBSD: setlocale.c,v 1.40 2002/08/02 12:27:32 tshiozak Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -171,9 +171,7 @@
do {
if (i == _LC_LAST)
return (NULL); /* too many slashes. */
- len = r - locale > sizeof(new_categories[i]) - 1
- ? sizeof(new_categories[i]) - 1
- : r - locale;
+ len = r - locale;
if (len + 1 > sizeof(new_categories[i]))
return (NULL); /* too long */
(void)memcpy(new_categories[i], locale, len);
Home |
Main Index |
Thread Index |
Old Index