diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-25 18:03:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-25 18:03:18 +0000 |
commit | 22ffcac6c7ac8f4ad96cc3e7072551baab91311f (patch) | |
tree | 74f2c84c8a74c6ad9264fd632c2a5cbf02d07257 /usr.bin/at/parsetime.c | |
parent | fc3c75d354684cf10d0f132a30a9c266ae4a4c7b (diff) |
variety of unsigned char casts (or conversions) for ctype
ok krw
Diffstat (limited to 'usr.bin/at/parsetime.c')
-rw-r--r-- | usr.bin/at/parsetime.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/at/parsetime.c b/usr.bin/at/parsetime.c index 97ae70f74e1..e489e53d487 100644 --- a/usr.bin/at/parsetime.c +++ b/usr.bin/at/parsetime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parsetime.c,v 1.18 2010/07/02 23:40:09 krw Exp $ */ +/* $OpenBSD: parsetime.c,v 1.19 2013/11/25 18:02:50 deraadt Exp $ */ /* * parsetime.c - parse time for at(1) @@ -213,7 +213,7 @@ token(void) * we'll continue, which puts us up at the top of the while loop * to fetch the next argument in */ - while (isspace(*sct)) + while (isspace((unsigned char)*sct)) ++sct; if (!*sct) { need = 1; @@ -228,13 +228,13 @@ token(void) /* * then see what it is */ - if (isdigit(sc_token[0])) { - while (isdigit(*sct)) + if (isdigit((unsigned char)sc_token[0])) { + while (isdigit((unsigned char)*sct)) sc_token[++idx] = *sct++; sc_token[++idx] = 0; return ((sc_tokid = NUMBER)); - } else if (isalpha(sc_token[0])) { - while (isalpha(*sct)) + } else if (isalpha((unsigned char)sc_token[0])) { + while (isalpha((unsigned char)*sct)) sc_token[++idx] = *sct++; sc_token[++idx] = 0; return (parse_token(sc_token)); |