Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/lib/libc/net Pullup rev 1.12-1.13, approved by thorpej, ...
details: https://anonhg.NetBSD.org/src/rev/f8d8a89b0f69
branches: netbsd-1-5
changeset: 489354:f8d8a89b0f69
user: jhawk <jhawk%NetBSD.org@localhost>
date: Sun Sep 03 19:08:01 2000 +0000
description:
Pullup rev 1.12-1.13, approved by thorpej, requested by jhawk:
> revision 1.13
> date: 2000/07/07 08:03:39; author: itohy; state: Exp; lines: +4 -4
> Passing "char" values to ctype(3) functions is problematic.
> If an argument of a ctype function is outside "unsigned char"
> and if it is not EOF, the behavior is undefined.
>
> The isascii(3) is the sole exception of above and it was used to
> be used to check a value was valid for other ctype functions in
> ancient systems. On modern systems, the ctype functions take
> all values of "unsigned char", and this check is obsolete and
> even wrong for non-ASCII systems. However, we leave the isascii()
> untouched for now, so as not to change the current behavior.
> ----------------------------
> revision 1.12
> date: 2000/07/06 02:57:23; author: christos; state: Exp; lines: +5 -4
> de-register
> use the proper types for vars
diffstat:
lib/libc/net/inet_network.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 0f2d67152575 -r f8d8a89b0f69 lib/libc/net/inet_network.c
--- a/lib/libc/net/inet_network.c Sun Sep 03 04:18:42 2000 +0000
+++ b/lib/libc/net/inet_network.c Sun Sep 03 19:08:01 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inet_network.c,v 1.11 2000/04/23 16:59:12 itojun Exp $ */
+/* $NetBSD: inet_network.c,v 1.11.4.1 2000/09/03 19:08:01 jhawk Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: inet_network.c,v 1.11 2000/04/23 16:59:12 itojun Exp $");
+__RCSID("$NetBSD: inet_network.c,v 1.11.4.1 2000/09/03 19:08:01 jhawk Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -63,8 +63,9 @@
inet_network(cp)
register const char *cp;
{
- register u_long val, base, n, i;
- register char c;
+ u_long val, base;
+ size_t i, n;
+ u_char c;
u_long parts[4], *pp = parts;
int digit;
@@ -101,7 +102,7 @@
*pp++ = val, cp++;
goto again;
}
- if (*cp && !isspace(*cp))
+ if (*cp && !isspace((u_char) *cp))
return (INADDR_NONE);
*pp++ = val;
n = pp - parts;
Home |
Main Index |
Thread Index |
Old Index