From: Rusty Russell Date: Tue, 29 Nov 2011 22:45:11 +0000 (+1030) Subject: failtest: report failpath problems correctly. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=2006aa032d6f72599165e50242d06df35428d43a;ds=sidebyside failtest: report failpath problems correctly. It was the wrong way around, and also it's better to show the whole remaining failpath rather than the current letter. --- diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index 56ace743..a0c82539 100644 --- 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; }