aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/killall
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-07-15 07:33:56 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-07-15 07:33:56 +0000
commitfe1ba53cffec089612678238f4932b897fe0ed29 (patch)
tree1b4a86478d1acd54464034c6bdc406dcab5ce31d /usr.bin/killall
parentee6b783c62092ed9202a9b796fe7e1073d3c6f4e (diff)
downloadsrc-fe1ba53cffec089612678238f4932b897fe0ed29.tar.gz
src-fe1ba53cffec089612678238f4932b897fe0ed29.zip
Don't pass negative values into <ctype.h> functions on machines
with signed chars.
Notes
Notes: svn path=/head/; revision=132193
Diffstat (limited to 'usr.bin/killall')
-rw-r--r--usr.bin/killall/killall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c
index 3cb5d07deb3f..386d64504caa 100644
--- a/usr.bin/killall/killall.c
+++ b/usr.bin/killall/killall.c
@@ -67,7 +67,7 @@ upper(const char *str)
strncpy(buf, str, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
for (s = buf; *s; s++)
- *s = toupper(*s);
+ *s = toupper((unsigned char)*s);
return buf;
}
@@ -206,7 +206,7 @@ main(int ac, char **av)
zflag++;
break;
default:
- if (isalpha(**av)) {
+ if (isalpha((unsigned char)**av)) {
if (strncasecmp(*av, "sig", 3) == 0)
*av += 3;
for (sig = NSIG, p = sys_signame + 1;
@@ -217,7 +217,7 @@ main(int ac, char **av)
}
if (!sig)
nosig(*av);
- } else if (isdigit(**av)) {
+ } else if (isdigit((unsigned char)**av)) {
sig = strtol(*av, &ep, 10);
if (!*av || *ep)
errx(1, "illegal signal number: %s", *av);