diff options
| author | dsl <dsl@NetBSD.org> | 2004-10-30 15:15:37 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2004-10-30 15:15:37 +0000 |
| commit | e2f49bd9e27fbfdc2ef4b51281ebf1d45a09b037 (patch) | |
| tree | b56cb9e8359473a5d9798fa90271f4ed1aaf1829 | |
| parent | 9efede97a97fc34dc1962d1078cb9f24ecc584a6 (diff) | |
Add (unsigned char) cast to ctype functions
| -rw-r--r-- | crypto/dist/kame/racoon/backupsa.c | 10 | ||||
| -rw-r--r-- | crypto/dist/kame/racoon/localconf.c | 6 | ||||
| -rw-r--r-- | crypto/dist/kame/racoon/str2val.c | 8 | ||||
| -rw-r--r-- | usr.sbin/rbootd/bpf.c | 6 | ||||
| -rw-r--r-- | usr.sbin/rbootd/parseconf.c | 14 | ||||
| -rw-r--r-- | usr.sbin/rpc.bootparamd/bootparamd.c | 6 |
6 files changed, 25 insertions, 25 deletions
diff --git a/crypto/dist/kame/racoon/backupsa.c b/crypto/dist/kame/racoon/backupsa.c index 6901491303e..b5f3982b296 100644 --- a/crypto/dist/kame/racoon/backupsa.c +++ b/crypto/dist/kame/racoon/backupsa.c @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: backupsa.c,v 1.8 2003/07/12 09:37:09 itojun Exp $"); +__RCSID("$NetBSD: backupsa.c,v 1.9 2004/10/30 15:15:37 dsl Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -251,7 +251,7 @@ backupsa_from_file() created = mktime(&tm); p++; - for (q = p; *q != '\0' && !isspace(*q); q++) + for (q = p; *q != '\0' && !isspace((unsigned char)*q); q++) ; *q = '\0'; src = str2saddr(p, NULL); @@ -259,7 +259,7 @@ backupsa_from_file() goto err; p = q + 1; - for (q = p; *q != '\0' && !isspace(*q); q++) + for (q = p; *q != '\0' && !isspace((unsigned char)*q); q++) ; *q = '\0'; dst = str2saddr(p, NULL); @@ -272,7 +272,7 @@ backupsa_from_file() #define GETNEXTNUM(value, function) \ do { \ char *y; \ - for (q = p; *q != '\0' && !isspace(*q); q++) \ + for (q = p; *q != '\0' && !isspace((unsigned char)*q); q++) \ ; \ *q = '\0'; \ (value) = function(p, &y, 10); \ @@ -454,7 +454,7 @@ str2num(p, len) res = 0; for (i = len; i > 0; i--) { - if (!isdigit(*p)) + if (!isdigit((unsigned char)*p)) return -1; res *= 10; res += *p - '0'; diff --git a/crypto/dist/kame/racoon/localconf.c b/crypto/dist/kame/racoon/localconf.c index 869fd30a0bb..eb0a1e4432c 100644 --- a/crypto/dist/kame/racoon/localconf.c +++ b/crypto/dist/kame/racoon/localconf.c @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: localconf.c,v 1.2 2003/07/12 09:37:11 itojun Exp $"); +__RCSID("$NetBSD: localconf.c,v 1.3 2004/10/30 15:15:38 dsl Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -192,13 +192,13 @@ getpsk(str, len) continue; /* search the end of 1st string. */ - for (p = buf; *p != '\0' && !isspace(*p); p++) + for (p = buf; *p != '\0' && !isspace((unsigned char)*p); p++) ; if (*p == '\0') continue; /* no 2nd parameter */ *p = '\0'; /* search the 1st of 2nd string. */ - while (isspace(*++p)) + while (isspace((unsigned char)*++p)) ; if (*p == '\0') continue; /* no 2nd parameter */ diff --git a/crypto/dist/kame/racoon/str2val.c b/crypto/dist/kame/racoon/str2val.c index 5ea86626ccd..e7a1e0d0645 100644 --- a/crypto/dist/kame/racoon/str2val.c +++ b/crypto/dist/kame/racoon/str2val.c @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: str2val.c,v 1.2 2003/07/12 09:37:12 itojun Exp $"); +__RCSID("$NetBSD: str2val.c,v 1.3 2004/10/30 15:15:38 dsl Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -88,9 +88,9 @@ str2val(str, base, len) i = 0; for (p = str; *p != '\0'; p++) { - if (isxdigit(*p)) + if (isxdigit((unsigned char)*p)) i++; - else if (isspace(*p)) + else if (isspace((unsigned char)*p)) ; else return NULL; @@ -105,7 +105,7 @@ str2val(str, base, len) i = 0; f = 0; for (rp = dst, p = str; *p != '\0'; p++) { - if (isxdigit(*p)) { + if (isxdigit((unsigned char)*p)) { if (!f) { b[0] = *p; f = 1; diff --git a/usr.sbin/rbootd/bpf.c b/usr.sbin/rbootd/bpf.c index 560d4676501..e3bebb44176 100644 --- a/usr.sbin/rbootd/bpf.c +++ b/usr.sbin/rbootd/bpf.c @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.16 2004/04/10 17:53:05 darrenr Exp $ */ +/* $NetBSD: bpf.c,v 1.17 2004/10/30 15:20:36 dsl Exp $ */ /* * Copyright (c) 1992, 1993 @@ -89,7 +89,7 @@ #if 0 static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: bpf.c,v 1.16 2004/04/10 17:53:05 darrenr Exp $"); +__RCSID("$NetBSD: bpf.c,v 1.17 2004/10/30 15:20:36 dsl Exp $"); #endif #endif /* not lint */ @@ -296,7 +296,7 @@ BpfGetIntfName(errmsg) #endif continue; - for (cp = ifa->ifa_name; !isdigit(*cp); ++cp) + for (cp = ifa->ifa_name; !isdigit((unsigned char)*cp); ++cp) ; n = atoi(cp); if (n < minunit) { diff --git a/usr.sbin/rbootd/parseconf.c b/usr.sbin/rbootd/parseconf.c index 576693c18ef..f1e841a11a0 100644 --- a/usr.sbin/rbootd/parseconf.c +++ b/usr.sbin/rbootd/parseconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: parseconf.c,v 1.8 2003/08/07 11:25:41 agc Exp $ */ +/* $NetBSD: parseconf.c,v 1.9 2004/10/30 15:20:36 dsl Exp $ */ /* * Copyright (c) 1992, 1993 @@ -89,7 +89,7 @@ #if 0 static char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: parseconf.c,v 1.8 2003/08/07 11:25:41 agc Exp $"); +__RCSID("$NetBSD: parseconf.c,v 1.9 2004/10/30 15:20:36 dsl Exp $"); #endif #endif /* not lint */ @@ -158,9 +158,9 @@ ParseConfig() * and null terminates it. `cp' is positioned at the start * of the next token. spaces & commas are separators. */ -#define GETSTR while (isspace(*cp) || *cp == ',') cp++; \ - bcp = cp; \ - while (*cp && *cp!=',' && !isspace(*cp)) cp++; \ +#define GETSTR while (isspace((unsigned char)*cp) || *cp == ',') cp++; \ + bcp = cp; \ + while (*cp && *cp!=',' && !isspace((unsigned char)*cp)) cp++;\ if (*cp) *cp++ = '\0' /* @@ -313,10 +313,10 @@ ParseAddr(str) /* * Convert hex character to an integer. */ - if (isdigit(*cp)) + if (isdigit((unsigned char)*cp)) i = *cp - '0'; else { - i = (isupper(*cp)? tolower(*cp): *cp) - 'a' + 10; + i = tolower((unsigned char)*cp) - 'a' + 10; if (i < 10 || i > 15) /* not a hex char */ return(NULL); } diff --git a/usr.sbin/rpc.bootparamd/bootparamd.c b/usr.sbin/rpc.bootparamd/bootparamd.c index 7f6f74a2344..c2df0d96e92 100644 --- a/usr.sbin/rpc.bootparamd/bootparamd.c +++ b/usr.sbin/rpc.bootparamd/bootparamd.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootparamd.c,v 1.43 2004/09/07 13:20:40 jrf Exp $ */ +/* $NetBSD: bootparamd.c,v 1.44 2004/10/30 15:23:30 dsl Exp $ */ /* * This code is not copyright, and is placed in the public domain. @@ -11,7 +11,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: bootparamd.c,v 1.43 2004/09/07 13:20:40 jrf Exp $"); +__RCSID("$NetBSD: bootparamd.c,v 1.44 2004/10/30 15:23:30 dsl Exp $"); #endif #include <sys/types.h> @@ -92,7 +92,7 @@ main(argc, argv) iface = optarg; break; case 'r': - if (isdigit(*optarg)) { + if (isdigit((unsigned char)*optarg)) { if (inet_aton(optarg, &route_addr) != 0) break; } |
