projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7dedf4
)
tap: fix isdigit and isspace usage.
author
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 17 Mar 2011 11:42:22 +0000
(22:12 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 17 Mar 2011 11:42:22 +0000
(22:12 +1030)
isspace() and isdigit() want an unsigned value.
ccan/tap/tap.c
patch
|
blob
|
history
diff --git
a/ccan/tap/tap.c
b/ccan/tap/tap.c
index 6d3ba0db18923a3eadacdad294cbe1d38ef69884..9f6d4d066a4e7068d16bc05659cb47fd680b3f6b 100644
(file)
--- 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;
}