diff options
-rw-r--r-- | usr.bin/sdiff/edit.c | 4 | ||||
-rw-r--r-- | usr.bin/sdiff/sdiff.c | 10 | ||||
-rw-r--r-- | usr.bin/stat/stat.c | 8 | ||||
-rw-r--r-- | usr.bin/systat/engine.c | 4 | ||||
-rw-r--r-- | usr.bin/tftp/main.c | 6 | ||||
-rw-r--r-- | usr.bin/vmstat/vmstat.c | 4 | ||||
-rw-r--r-- | usr.bin/xinstall/xinstall.c | 6 | ||||
-rw-r--r-- | usr.bin/xstr/xstr.c | 7 |
8 files changed, 25 insertions, 24 deletions
diff --git a/usr.bin/sdiff/edit.c b/usr.bin/sdiff/edit.c index 8b0f522a4f6..386dc380ea6 100644 --- a/usr.bin/sdiff/edit.c +++ b/usr.bin/sdiff/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.19 2009/06/07 13:29:50 ray Exp $ */ +/* $OpenBSD: edit.c,v 1.20 2013/11/26 21:08:12 deraadt Exp $ */ /* * Written by Raymond Lai <ray@cyth.net>. @@ -88,7 +88,7 @@ eparse(const char *cmd, const char *left, const char *right) char buf[BUFSIZ], *text; /* Skip whitespace. */ - while (isspace(*cmd)) + while (isspace((unsigned char)*cmd)) ++cmd; text = NULL; diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index 33bb6bf0eec..3866d7bc8d6 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdiff.c,v 1.29 2013/04/01 16:08:00 tobias Exp $ */ +/* $OpenBSD: sdiff.c,v 1.30 2013/11/26 21:08:12 deraadt Exp $ */ /* * Written by Raymond Lai <ray@cyth.net>. @@ -427,7 +427,7 @@ prompt(const char *s1, const char *s2) const char *p; /* Skip leading whitespace. */ - for (p = cmd; isspace(*p); ++p) + for (p = cmd; isspace((unsigned char)*p); ++p) ; switch (*p) { @@ -585,7 +585,7 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) p = line; /* Go to character after line number. */ - while (isdigit(*p)) + while (isdigit((unsigned char)*p)) ++p; c = *p; *p++ = 0; @@ -598,7 +598,7 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) q = p; /* Go to character after file2end. */ - while (isdigit(*p)) + while (isdigit((unsigned char)*p)) ++p; c = *p; *p++ = 0; @@ -618,7 +618,7 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) q = p; /* Go to character after line number. */ - while (isdigit(*p)) + while (isdigit((unsigned char)*p)) ++p; c = *p; *p++ = 0; diff --git a/usr.bin/stat/stat.c b/usr.bin/stat/stat.c index b499141c216..b2fcc301082 100644 --- a/usr.bin/stat/stat.c +++ b/usr.bin/stat/stat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stat.c,v 1.17 2010/10/29 05:36:25 guenther Exp $ */ +/* $OpenBSD: stat.c,v 1.18 2013/11/26 21:08:12 deraadt Exp $ */ /* $NetBSD: stat.c,v 1.19 2004/06/20 22:20:16 jmc Exp $ */ /* @@ -384,9 +384,9 @@ output(const struct stat *st, const char *file, } while (1/*CONSTCOND*/); size = -1; - if (isdigit((unsigned)*statfmt)) { + if (isdigit((unsigned char)*statfmt)) { size = 0; - while (isdigit((unsigned)*statfmt)) { + while (isdigit((unsigned char)*statfmt)) { size = (size * 10) + (*statfmt - '0'); statfmt++; if (size < 0) @@ -399,7 +399,7 @@ output(const struct stat *st, const char *file, statfmt++; prec = 0; - while (isdigit((unsigned)*statfmt)) { + while (isdigit((unsigned char)*statfmt)) { prec = (prec * 10) + (*statfmt - '0'); statfmt++; if (prec < 0) diff --git a/usr.bin/systat/engine.c b/usr.bin/systat/engine.c index 6a8cd97ad41..04782f3c9de 100644 --- a/usr.bin/systat/engine.c +++ b/usr.bin/systat/engine.c @@ -1,4 +1,4 @@ -/* $Id: engine.c,v 1.15 2013/09/07 11:43:49 reyk Exp $ */ +/* $Id: engine.c,v 1.16 2013/11/26 21:08:12 deraadt Exp $ */ /* * Copyright (c) 2001, 2007 Can Erkin Acar <canacar@openbsd.org> * @@ -168,7 +168,7 @@ tbprintft(char *format, ...) /* count until we hit a non digit. (e.g. the prefix) */ for (digits = 0; digits < len; digits++) - if (!isdigit(buf[digits])) + if (!isdigit((unsigned char)buf[digits])) break; curdigit = digits; diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index e69c0467189..debf8dfcca8 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.33 2012/05/21 13:14:30 gsoares Exp $ */ +/* $OpenBSD: main.c,v 1.34 2013/11/26 21:08:12 deraadt Exp $ */ /* $NetBSD: main.c,v 1.6 1995/05/21 16:54:10 mycroft Exp $ */ /* @@ -669,13 +669,13 @@ makeargv(void) ret = 1; break; } - while (isspace(*cp)) + while (isspace((unsigned char)*cp)) cp++; if (*cp == '\0') break; *argp++ = cp; margc += 1; - while (*cp != '\0' && !isspace(*cp)) + while (*cp != '\0' && !isspace((unsigned char)*cp)) cp++; if (*cp == '\0') break; diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 4f0a4a3acb3..3259a036d61 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,5 +1,5 @@ /* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */ -/* $OpenBSD: vmstat.c,v 1.126 2013/11/13 22:26:02 chl Exp $ */ +/* $OpenBSD: vmstat.c,v 1.127 2013/11/26 21:08:12 deraadt Exp $ */ /* * Copyright (c) 1980, 1986, 1991, 1993 @@ -268,7 +268,7 @@ choosedrives(char **argv) #define BACKWARD_COMPATIBILITY for (ndrives = 0; *argv; ++argv) { #ifdef BACKWARD_COMPATIBILITY - if (isdigit(**argv)) + if (isdigit((unsigned char)**argv)) break; #endif for (i = 0; i < dk_ndrive; i++) { diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index fa33d425609..f13e54c3529 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xinstall.c,v 1.54 2013/06/02 01:41:23 naddy Exp $ */ +/* $OpenBSD: xinstall.c,v 1.55 2013/11/26 21:08:10 deraadt Exp $ */ /* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */ /* @@ -151,10 +151,10 @@ main(int argc, char *argv[]) safecopy = 1; /* get group and owner id's */ - if (group && !(gp = getgrnam(group)) && !isdigit(*group)) + if (group && !(gp = getgrnam(group)) && !isdigit((unsigned char)*group)) errx(EX_NOUSER, "unknown group %s", group); gid = (group) ? ((gp) ? gp->gr_gid : (gid_t)strtoul(group, NULL, 10)) : (gid_t)-1; - if (owner && !(pp = getpwnam(owner)) && !isdigit(*owner)) + if (owner && !(pp = getpwnam(owner)) && !isdigit((unsigned char)*owner)) errx(EX_NOUSER, "unknown user %s", owner); uid = (owner) ? ((pp) ? pp->pw_uid : (uid_t)strtoul(owner, NULL, 10)) : (uid_t)-1; diff --git a/usr.bin/xstr/xstr.c b/usr.bin/xstr/xstr.c index a04250fb09d..28dd99cf7d5 100644 --- a/usr.bin/xstr/xstr.c +++ b/usr.bin/xstr/xstr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xstr.c,v 1.17 2011/04/06 11:36:26 miod Exp $ */ +/* $OpenBSD: xstr.c,v 1.18 2013/11/26 21:08:09 deraadt Exp $ */ /* $NetBSD: xstr.c,v 1.5 1994/12/24 16:57:59 cgd Exp $ */ /* @@ -173,7 +173,8 @@ process(char *name) break; } if (linebuf[0] == '#') { - if (linebuf[1] == ' ' && isdigit(linebuf[2])) + if (linebuf[1] == ' ' && + isdigit((unsigned char)linebuf[2])) printf("#line%s", &linebuf[1]); else printf("%s", linebuf); @@ -282,7 +283,7 @@ int octdigit(char c) { - return (isdigit(c) && c != '8' && c != '9'); + return (isdigit((unsigned char)c) && c != '8' && c != '9'); } void |