Browse Source

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.
Rusty Russell 14 years ago
parent
commit
2006aa032d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ccan/failtest/failtest.c

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