diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-26 13:19:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-26 13:19:08 +0000 |
commit | 9c87bfa9d5ea46fd4fe5c8edb947aec28e748573 (patch) | |
tree | 8be8e4e1654412e91168bb2f405a3a753d0c8972 /usr.bin/from | |
parent | 60adb56e9c39b26c1401c07dc1d1c8f79489daed (diff) |
unsigned char casts for ctype
ok krw
Diffstat (limited to 'usr.bin/from')
-rw-r--r-- | usr.bin/from/from.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index b31dec53f79..1bda21e13c9 100644 --- a/usr.bin/from/from.c +++ b/usr.bin/from/from.c @@ -1,4 +1,4 @@ -/* $OpenBSD: from.c,v 1.14 2009/10/27 23:59:38 deraadt Exp $ */ +/* $OpenBSD: from.c,v 1.15 2013/11/26 13:18:55 deraadt Exp $ */ /* $NetBSD: from.c,v 1.6 1995/09/01 01:39:10 jtc Exp $ */ /* @@ -63,8 +63,8 @@ main(int argc, char *argv[]) case 's': sender = optarg; for (p = sender; *p; ++p) - if (isupper(*p)) - *p = tolower(*p); + if (isupper((unsigned char)*p)) + *p = tolower((unsigned char)*p); break; case '?': default: @@ -122,18 +122,18 @@ match(char *line, char *sender) char ch, pch, first, *p, *t; for (first = *sender++;;) { - if (isspace(ch = *line)) + if (isspace((unsigned char)(ch = *line))) return(0); ++line; - if (isupper(ch)) - ch = tolower(ch); + if (isupper((unsigned char)ch)) + ch = tolower((unsigned char)ch); if (ch != first) continue; for (p = sender, t = line;;) { if (!(pch = *p++)) return(1); - if (isupper(ch = *t++)) - ch = tolower(ch); + if (isupper((unsigned char)(ch = *t++))) + ch = tolower((unsigned char)ch); if (ch != pch) break; } |