Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin Add (unsigned char) cast to ctype functions
details: https://anonhg.NetBSD.org/src/rev/b0e4adb59c26
branches: trunk
changeset: 570830:b0e4adb59c26
user: dsl <dsl%NetBSD.org@localhost>
date: Sat Oct 30 15:28:45 2004 +0000
description:
Add (unsigned char) cast to ctype functions
diffstat:
usr.sbin/rpc.pcnfsd/pcnfsd_print.c | 14 +++++++-------
usr.sbin/rtadvd/advcap.c | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
diffs (99 lines):
diff -r c2ca65fb7edd -r b0e4adb59c26 usr.sbin/rpc.pcnfsd/pcnfsd_print.c
--- a/usr.sbin/rpc.pcnfsd/pcnfsd_print.c Sat Oct 30 15:15:37 2004 +0000
+++ b/usr.sbin/rpc.pcnfsd/pcnfsd_print.c Sat Oct 30 15:28:45 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcnfsd_print.c,v 1.7 2003/07/16 08:22:01 itojun Exp $ */
+/* $NetBSD: pcnfsd_print.c,v 1.8 2004/10/30 15:28:45 dsl Exp $ */
/* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_print.c 1.7 92/01/24 19:58:58 SMI */
/*
@@ -550,7 +550,7 @@
return (0);
}
while (fgets(buff, 255, p) != NULL) {
- if (isspace(buff[0]))
+ if (isspace((unsigned char)buff[0]))
continue;
if ((cp = strtok(buff, delims)) == NULL)
@@ -778,7 +778,7 @@
files = &buff[FILECOL - 1];
cp = totsize;
cp--;
- while (cp > files && isspace(*cp))
+ while (cp > files && isspace((unsigned char)*cp))
*cp-- = '\0';
buff[FILECOL - 2] = '\0';
@@ -1023,16 +1023,16 @@
** [no entries | N entr[y|ies] in spool area]
** <status message, may include the word "attention">
*/
- while (fgets(buff, 255, p) != NULL && isspace(buff[0])) {
+ while (fgets(buff, 255, p) != NULL && isspace((unsigned char)buff[0])) {
cp = buff;
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if (*cp == '\0')
break;
cp1 = cp;
cp2 = buff2;
while (*cp1 && *cp1 != '\n') {
- *cp2++ = tolower(*cp1);
+ *cp2++ = tolower((unsigned char)*cp1);
cp1++;
}
*cp1 = '\0';
@@ -1049,7 +1049,7 @@
*printing = (strstr(buff2, "enabled") != NULL);
continue;
}
- if (isdigit(buff2[0]) && (strstr(buff2, "entr") != NULL)) {
+ if (isdigit((unsigned char)buff2[0]) && (strstr(buff2, "entr") != NULL)) {
*qlen = atoi(buff2);
continue;
diff -r c2ca65fb7edd -r b0e4adb59c26 usr.sbin/rtadvd/advcap.c
--- a/usr.sbin/rtadvd/advcap.c Sat Oct 30 15:15:37 2004 +0000
+++ b/usr.sbin/rtadvd/advcap.c Sat Oct 30 15:28:45 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: advcap.c,v 1.9 2003/08/07 11:25:42 agc Exp $ */
+/* $NetBSD: advcap.c,v 1.10 2004/10/30 15:36:12 dsl Exp $ */
/* $KAME: advcap.c,v 1.9 2002/05/29 14:28:35 itojun Exp $ */
/*
@@ -275,8 +275,8 @@
break;
case '\\':
bp++;
- if (isdigit(*bp)) {
- while (isdigit(*bp++))
+ if (isdigit((unsigned char)*bp)) {
+ while (isdigit((unsigned char)*bp++))
;
} else
bp++;
@@ -327,7 +327,7 @@
if (*bp == '0')
base = 8;
i = 0;
- while (isdigit(*bp))
+ while (isdigit((unsigned char)*bp))
i *= base, i += *bp++ - '0';
return (i);
}
@@ -429,11 +429,11 @@
dp++;
if (*dp)
goto nextc;
- if (isdigit(c)) {
+ if (isdigit((unsigned char)c)) {
c -= '0', i = 2;
do
c <<= 3, c |= *str++ - '0';
- while (--i && isdigit(*str));
+ while (--i && isdigit((unsigned char)*str));
}
break;
}
Home |
Main Index |
Thread Index |
Old Index