Add (unsigned char) casts to is{digit,lower,space,upper} calls.
This commit is contained in:
parent
47102b749e
commit
3f75969658
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bim.c,v 1.15 2002/12/12 11:06:12 scw Exp $ */
|
||||
/* $NetBSD: bim.c,v 1.16 2005/01/12 09:04:53 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Philip A. Nelson.
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: bim.c,v 1.15 2002/12/12 11:06:12 scw Exp $");
|
||||
__RCSID("$NetBSD: bim.c,v 1.16 2005/01/12 09:04:53 simonb Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -435,8 +435,8 @@ add_image(num, args, syntax)
|
||||
for (nptr = im_table->ii_images[which_image].boot_name;
|
||||
*nptr != 0;
|
||||
nptr++)
|
||||
if (isupper(*nptr))
|
||||
*nptr = tolower(*nptr);
|
||||
if (isupper((unsigned char)*nptr))
|
||||
*nptr = tolower((unsigned char)*nptr);
|
||||
printf("added image %d (%s).\n", which_image,
|
||||
im_table->ii_images[which_image].boot_name);
|
||||
close(im_file);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: command.c,v 1.4 2003/11/12 06:45:14 simonb Exp $ */
|
||||
/* $NetBSD: command.c,v 1.5 2005/01/12 09:04:53 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Philip A. Nelson.
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: command.c,v 1.4 2003/11/12 06:45:14 simonb Exp $");
|
||||
__RCSID("$NetBSD: command.c,v 1.5 2005/01/12 09:04:53 simonb Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -162,13 +162,14 @@ parse(cmdline, args)
|
||||
|
||||
/* Start looking for the commands */
|
||||
while (*cmdline != 0) {
|
||||
while (isspace(*cmdline))
|
||||
while (isspace((unsigned char)*cmdline))
|
||||
cmdline++; /* skip blanks. */
|
||||
if (*cmdline != 0) {
|
||||
/* Start of new argument. */
|
||||
if (argcnt < MAXARGS)
|
||||
args[argcnt] = cmdline;
|
||||
while (!isspace(*cmdline) && *cmdline != 0)
|
||||
while (!isspace((unsigned char)*cmdline) &&
|
||||
*cmdline != 0)
|
||||
cmdline++;
|
||||
if (*cmdline != 0)
|
||||
*cmdline++ = 0;
|
||||
@ -227,7 +228,7 @@ Str2Int(str, num)
|
||||
char *str;
|
||||
int *num;
|
||||
{
|
||||
if (!isdigit(*str) && *str != '-')
|
||||
if (!isdigit((unsigned char)*str) && *str != '-')
|
||||
return FALSE;
|
||||
*num = atoi(str);
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user