From 42f68a7a6d855d973bf3c59d10e6519e0240d4f2 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 26 Nov 2013 13:21:19 +0000 Subject: unsigned char casts for ctype ok krw --- usr.bin/jot/jot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.bin/jot/jot.c') diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index b773e6001d3..23ba16b3095 100644 --- a/usr.bin/jot/jot.c +++ b/usr.bin/jot/jot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: jot.c,v 1.22 2013/11/15 15:47:53 millert Exp $ */ +/* $OpenBSD: jot.c,v 1.23 2013/11/26 13:21:18 deraadt Exp $ */ /* $NetBSD: jot.c,v 1.3 1994/12/02 20:29:43 pk Exp $ */ /*- @@ -337,7 +337,7 @@ getprec(char *s) if (*p == '\0') return (0); for (q = ++p; *p != '\0'; p++) - if (!isdigit(*p)) + if (!isdigit((unsigned char)*p)) break; return (p - q); } @@ -378,8 +378,8 @@ getformat(void) */ p2 = p++; dot = hash = space = sign = numbers = 0; - while (!isalpha(*p)) { - if (isdigit(*p)) { + while (!isalpha((unsigned char)*p)) { + if (isdigit((unsigned char)*p)) { numbers++; p++; } else if ((*p == '#' && !(numbers|dot|sign|space| -- cgit v1.2.3