Add (unsigned char) cast to ctype function

This commit is contained in:
dsl 2004-10-29 19:51:36 +00:00
parent 26207dda78
commit 238960af7e
7 changed files with 21 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: chio.c,v 1.25 2004/06/25 14:27:57 wiz Exp $ */
/* $NetBSD: chio.c,v 1.26 2004/10/29 19:51:36 dsl Exp $ */
/*-
* Copyright (c) 1996, 1998, 1999 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
__COPYRIGHT(
"@(#) Copyright (c) 1996, 1998, 1999\
The NetBSD Foundation, Inc. All rights reserved.");
__RCSID("$NetBSD: chio.c,v 1.25 2004/06/25 14:27:57 wiz Exp $");
__RCSID("$NetBSD: chio.c,v 1.26 2004/10/29 19:51:36 dsl Exp $");
#endif
#include <sys/param.h>
@ -545,7 +545,7 @@ do_status(const char *cname, int argc, char **argv)
* If we get an element type, we can't have specified
* anything else.
*/
if (isdigit(*argv[0]) == 0) {
if (isdigit((unsigned char)*argv[0]) == 0) {
if (schet == echet || flags != 0 || have_unit ||
have_ucount) {
warnx("%s: malformed command line", cname);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ps.c,v 1.54 2004/03/27 14:09:10 simonb Exp $ */
/* $NetBSD: ps.c,v 1.55 2004/10/29 19:53:29 dsl Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -75,7 +75,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: ps.c,v 1.54 2004/03/27 14:09:10 simonb Exp $");
__RCSID("$NetBSD: ps.c,v 1.55 2004/10/29 19:53:29 dsl Exp $");
#endif
#endif /* not lint */
@ -698,7 +698,7 @@ kludge_oldps_options(char *s)
* otherwise check for trailing number, which *may* be a
* pid.
*/
while (cp >= s && isdigit(*cp))
while (cp >= s && isdigit((unsigned char)*cp))
--cp;
}
cp++;
@ -708,7 +708,7 @@ kludge_oldps_options(char *s)
* if there's a trailing number, and not a preceding 'p' (pid) or
* 't' (tty) flag, then assume it's a pid and insert a 'p' flag.
*/
if (isdigit(*cp) &&
if (isdigit((unsigned char)*cp) &&
(cp == s || (cp[-1] != 'U' && cp[-1] != 't' && cp[-1] != 'p' &&
(cp - 1 == s || cp[-2] != 't'))))
*ns++ = 'p';

View File

@ -1,4 +1,4 @@
/* $NetBSD: policy.c,v 1.15 2003/08/01 05:42:48 provos Exp $ */
/* $NetBSD: policy.c,v 1.16 2004/10/29 19:55:43 dsl Exp $ */
/* $OpenBSD: policy.c,v 1.15 2002/08/07 00:34:17 vincent Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
@ -30,7 +30,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: policy.c,v 1.15 2003/08/01 05:42:48 provos Exp $");
__RCSID("$NetBSD: policy.c,v 1.16 2004/10/29 19:55:43 dsl Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -313,7 +313,7 @@ systrace_policyfilename(char *dirname, const char *name)
p = name;
while (*p) {
if (!isalnum(*p)) {
if (!isalnum((unsigned char)*p)) {
if (i != plen)
file[i++] = '_';
} else
@ -526,7 +526,7 @@ systrace_policyline(char *line)
/* Remove trailing white space */
p = line + strlen(line) - 1;
while (p > line) {
if (!isspace(*p))
if (!isspace((unsigned char)*p))
break;
*p-- = '\0';
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: util.c,v 1.5 2003/08/01 06:15:02 provos Exp $ */
/* $NetBSD: util.c,v 1.6 2004/10/29 19:55:43 dsl Exp $ */
/* $OpenBSD: util.c,v 1.8 2002/07/19 14:38:58 itojun Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
@ -30,7 +30,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: util.c,v 1.5 2003/08/01 06:15:02 provos Exp $");
__RCSID("$NetBSD: util.c,v 1.6 2004/10/29 19:55:43 dsl Exp $");
#include <sys/types.h>
#include <string.h>
@ -83,7 +83,7 @@ strrpl(char *str, size_t size, char *match, char *value)
/* Try to match against the variable */
while ((p = strchr(p, match[0])) != NULL) {
if (!strncmp(p, match, len) && !isalnum(p[len]))
if (!strncmp(p, match, len) && !isalnum((unsigned char)p[len]))
break;
p += len;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wks_11.c,v 1.1.1.1 2004/05/17 23:45:00 christos Exp $ */
/* $NetBSD: wks_11.c,v 1.2 2004/10/29 20:21:15 dsl Exp $ */
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
@ -109,7 +109,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
service[sizeof(service)-1] = '\0';
for (i = strlen(service) - 1; i >= 0; i--)
if (isupper(service[i]&0xff))
service[i] = tolower(service[i]);
service[i] = tolower((unsigned char)service[i]);
port = strtol(DNS_AS_STR(token), &e, 10);
if (*e == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: string.c,v 1.1.1.1 2004/05/17 23:45:03 christos Exp $ */
/* $NetBSD: string.c,v 1.2 2004/10/29 20:26:45 dsl Exp $ */
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
@ -62,7 +62,7 @@ isc_string_touint64(char *source, char **end, int base) {
tmp = 0;
while ((c = *s) != 0) {
c = tolower(c);
c = tolower((unsigned char)c);
/* end ? */
if ((o = strchr(digits, c)) == NULL) {
*end = s;

View File

@ -1,4 +1,4 @@
/* $NetBSD: parser.c,v 1.9 2003/02/01 17:13:14 wiz Exp $ */
/* $NetBSD: parser.c,v 1.10 2004/10/29 19:58:18 dsl Exp $ */
/* $KAME: parser.c,v 1.16 2002/02/20 10:40:39 kjc Exp $ */
/*
* Copyright (C) 1999-2002
@ -401,7 +401,7 @@ get_port(const char *name, u_int16_t *port_no)
struct servent *s;
u_int16_t num;
if (isdigit(name[0])) {
if (isdigit((unsigned char)name[0])) {
num = (u_int16_t)strtol(name, NULL, 0);
*port_no = htons(num);
return (1);
@ -419,7 +419,7 @@ get_proto(const char *name, int *proto_no)
{
struct protoent *p;
if (isdigit(name[0])) {
if (isdigit((unsigned char)name[0])) {
*proto_no = (int)strtol(name, NULL, 0);
return (1);
}