From 2006aa032d6f72599165e50242d06df35428d43a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 30 Nov 2011 09:15:11 +1030 Subject: [PATCH] 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. --- ccan/failtest/failtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.2