diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:35:09 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:35:09 +0000 |
commit | 543fbac3245cf13bf161c2e8559131cd7dfcce4a (patch) | |
tree | 8a0e794420e69b2592b11b2ce32c2dcadb757b1c /games | |
parent | 4a4cafe6eacfa96865870ed78c30f1b950c8ce20 (diff) |
Cast ctype functions' argument to unsigned char.
ok guenther@
Diffstat (limited to 'games')
-rw-r--r-- | games/hunt/hunt/hunt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/games/hunt/hunt/hunt.c b/games/hunt/hunt/hunt.c index c073fb73469..637e6aec4e6 100644 --- a/games/hunt/hunt/hunt.c +++ b/games/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hunt.c,v 1.14 2014/11/16 04:49:48 guenther Exp $ */ +/* $OpenBSD: hunt.c,v 1.15 2015/10/24 18:35:08 mmcc Exp $ */ /* $NetBSD: hunt.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -110,7 +110,7 @@ main(ac, av) break; case 't': team = *optarg; - if (!isdigit(team) && team != ' ') { + if (!isdigit((unsigned char)team) && team != ' ') { warnx("Team names must be numeric or space"); team = '-'; } @@ -603,7 +603,7 @@ env_init(enter_status) } else if (strncmp(envp, "team=", s - envp + 1) == 0) { team = *(s + 1); - if (!isdigit(team)) + if (!isdigit((unsigned char)team)) team = ' '; if ((s = strchr(envp, ',')) == NULL) { *envp = '\0'; @@ -669,7 +669,7 @@ again: goto again; } for (cp = name; *cp != '\0'; cp++) - if (!isprint(*cp)) { + if (!isprint((unsigned char)*cp)) { name[0] = '\0'; printf("Illegal character in your code name.\n"); goto again; |