From 3c57379406116cdf99483cfd28f44a5b70a602cb Mon Sep 17 00:00:00 2001 From: mmcc Date: Sat, 24 Oct 2015 17:34:16 +0000 Subject: [PATCH] Cast isblank()'s argument to unsigned char. ok guenther@ --- games/primes/primes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/games/primes/primes.c b/games/primes/primes.c index f5e9478ae6d..860d9a23049 100644 --- a/games/primes/primes.c +++ b/games/primes/primes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: primes.c,v 1.16 2015/09/07 00:49:20 tedu Exp $ */ +/* $OpenBSD: primes.c,v 1.17 2015/10/24 17:34:16 mmcc Exp $ */ /* $NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $ */ /* @@ -184,7 +184,7 @@ read_num_buf(void) exit(0); } buf[strcspn(buf, "\n")] = '\0'; - for (p = buf; isblank(*p); ++p) + for (p = buf; isblank((unsigned char)*p); ++p) ; if (*p == '\0') continue; @@ -194,7 +194,7 @@ read_num_buf(void) val = strtoul(buf, &p, 10); if (errno) err(1, "%s", buf); - for (; isblank(*p); ++p) + for (; isblank((unsigned char)*p); ++p) ; if (*p != '\0') errx(1, "%s: illegal numeric format.", buf); -- 2.20.1