Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/grfconfig Add casts to unsigned char for the argume...
details: https://anonhg.NetBSD.org/src/rev/00b2efecb832
branches: trunk
changeset: 571199:00b2efecb832
user: he <he%NetBSD.org@localhost>
date: Sat Nov 13 14:32:14 2004 +0000
description:
Add casts to unsigned char for the arguments to ctype.h functions.
diffstat:
usr.sbin/grfconfig/grfconfig.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (43 lines):
diff -r 80daa693fe75 -r 00b2efecb832 usr.sbin/grfconfig/grfconfig.c
--- a/usr.sbin/grfconfig/grfconfig.c Sat Nov 13 13:37:06 2004 +0000
+++ b/usr.sbin/grfconfig/grfconfig.c Sat Nov 13 14:32:14 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grfconfig.c,v 1.10 2001/01/22 21:11:23 is Exp $ */
+/* $NetBSD: grfconfig.c,v 1.11 2004/11/13 14:32:14 he Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
#endif /* not lint */
#ifndef lint
-__RCSID("$NetBSD: grfconfig.c,v 1.10 2001/01/22 21:11:23 is Exp $");
+__RCSID("$NetBSD: grfconfig.c,v 1.11 2004/11/13 14:32:14 he Exp $");
#endif /* not lint */
#include <sys/file.h>
@@ -142,11 +142,11 @@
* check for end-of-section, comments, strip off trailing
* spaces and newline character.
*/
- for (p = buf; isspace(*p); ++p)
+ for (p = buf; isspace((unsigned char)*p); ++p)
continue;
if (*p == '\0' || *p == '#')
continue;
- for (p = strchr(buf, '\0'); isspace(*--p);)
+ for (p = strchr(buf, '\0'); isspace((unsigned char)*--p);)
continue;
*++p = '\0';
@@ -157,8 +157,8 @@
*tbuf2 = '\0';
break;
}
- if (isupper(*tbuf2)) {
- *tbuf2 = tolower(*tbuf2);
+ if (isupper((unsigned char)*tbuf2)) {
+ *tbuf2 = tolower((unsigned char)*tbuf2);
}
obuf++;
tbuf2++;
Home |
Main Index |
Thread Index |
Old Index