projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acb6106
)
failtest: report failpath problems correctly.
author
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 29 Nov 2011 22:45:11 +0000
(09:15 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 29 Nov 2011 22:45:11 +0000
(09:15 +1030)
It was the wrong way around, and also it's better to show the whole
remaining failpath rather than the current letter.
ccan/failtest/failtest.c
patch
|
blob
|
history
diff --git
a/ccan/failtest/failtest.c
b/ccan/failtest/failtest.c
index 56ace7431847c5ac9fd059b77d4b9271958a3fb7..a0c825399d03881ab0338075a0a46fb2c4ec1898 100644
(file)
--- a/
ccan/failtest/failtest.c
+++ b/
ccan/failtest/failtest.c
@@
-518,8
+518,8
@@
static bool should_fail(struct failtest_call *call)
} else {
if (tolower((unsigned char)*failpath)
!= info_to_arg[call->type])
- errx(1, "Failpath expected '%
c
' got '%c'\n",
-
info_to_arg[call->type], *failpath
);
+ errx(1, "Failpath expected '%
s
' got '%c'\n",
+
failpath, info_to_arg[call->type]
);
call->fail = cisupper(*(failpath++));
return call->fail;
}