From 18db8f6ff7faf1fe5e831427bc6b524de139dcfe Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 17 Mar 2011 22:12:22 +1030 Subject: [PATCH] tap: fix isdigit and isspace usage. isspace() and isdigit() want an unsigned value. --- ccan/tap/tap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.2