diff options
author | tjr <tjr@FreeBSD.org> | 2004-07-15 07:33:56 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-07-15 07:33:56 +0000 |
commit | fccee4f3c3291b77b0999e61238e9e2c81e7a75f (patch) | |
tree | 1b4a86478d1acd54464034c6bdc406dcab5ce31d /usr.bin/killall | |
parent | 35c40abaacb5ee2e3eb0c6287297827732718424 (diff) | |
download | FreeBSD-src-fccee4f3c3291b77b0999e61238e9e2c81e7a75f.zip FreeBSD-src-fccee4f3c3291b77b0999e61238e9e2c81e7a75f.tar.gz |
Don't pass negative values into <ctype.h> functions on machines
with signed chars.
Diffstat (limited to 'usr.bin/killall')
-rw-r--r-- | usr.bin/killall/killall.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c index 3cb5d07..386d645 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); |