summaryrefslogtreecommitdiffstats
path: root/games/fortune
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-10-24 18:02:28 +0000
committermmcc <mmcc@openbsd.org>2015-10-24 18:02:28 +0000
commit4d3914505f8672cb397d9cf9ca65b3f055811a63 (patch)
treeea13db78941d29563c6fd0195d8298af3d4cdd16 /games/fortune
parentCast isdigit()'s argument to unsigned char. (diff)
downloadwireguard-openbsd-4d3914505f8672cb397d9cf9ca65b3f055811a63.tar.xz
wireguard-openbsd-4d3914505f8672cb397d9cf9ca65b3f055811a63.zip
Cast isdigit()'s argument to unsigned char.
ok guenther@
Diffstat (limited to 'games/fortune')
-rw-r--r--games/fortune/fortune/fortune.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c
index c928fd3f019..2de3ce95c4f 100644
--- a/games/fortune/fortune/fortune.c
+++ b/games/fortune/fortune/fortune.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fortune.c,v 1.43 2015/08/26 14:49:20 semarie Exp $ */
+/* $OpenBSD: fortune.c,v 1.44 2015/10/24 18:02:28 mmcc Exp $ */
/* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */
/*-
@@ -324,11 +324,11 @@ form_file_list(char **files, int file_cnt)
}
for (i = 0; i < file_cnt; i++) {
percent = NO_PROB;
- if (!isdigit(files[i][0]))
+ if (!isdigit((unsigned char)files[i][0]))
sp = files[i];
else {
percent = 0;
- for (sp = files[i]; isdigit(*sp); sp++)
+ for (sp = files[i]; isdigit((unsigned char)*sp); sp++)
percent = percent * 10 + *sp - '0';
if (percent > 100) {
fprintf(stderr, "percentages must be <= 100\n");