diff options
-rw-r--r-- | ccan/failtest/failtest.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index 7a6f5220..b25b049e 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -364,7 +364,10 @@ static bool should_fail(struct failtest_call *call) /* + means continue after end, like normal. */ if (*failpath == '+') failpath = NULL; - else { + else if (*failpath == '\0') { + /* Continue, but don't inject errors. */ + return call->fail = false; + } else { if (tolower((unsigned char)*failpath) != info_to_arg[call->type]) errx(1, "Failpath expected '%c' got '%c'\n", |