From: Rusty Russell Date: Thu, 17 Mar 2011 11:42:22 +0000 (+1030) Subject: tap: fix isdigit and isspace usage. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=18db8f6ff7faf1fe5e831427bc6b524de139dcfe;hp=b7dedf4344c7e573c048a36e7b456f2a4bdbebb7 tap: fix isdigit and isspace usage. isspace() and isdigit() want an unsigned value. --- diff --git a/ccan/tap/tap.c b/ccan/tap/tap.c index 6d3ba0db..9f6d4d06 100644 --- a/ccan/tap/tap.c +++ b/ccan/tap/tap.c @@ -115,7 +115,8 @@ _gen_result(int ok, const char *func, const char *file, unsigned int line, if(local_test_name) { name_is_digits = 1; for(c = local_test_name; *c != '\0'; c++) { - if(!isdigit(*c) && !isspace(*c)) { + if(!isdigit((unsigned char)*c) + && !isspace((unsigned char)*c)) { name_is_digits = 0; break; }