Browse Source

tap: fix isdigit and isspace usage.

isspace() and isdigit() want an unsigned value.
Rusty Russell 15 years ago
parent
commit
18db8f6ff7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ccan/tap/tap.c

+ 2 - 1
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;
 				}