X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest.c;h=b25b049edac1d162c663ae58218c75dc3815e0dd;hp=7a6f5220e60cd5ed7d1035922b267751c999a84e;hb=3ad57bc902f31ba347df59de04168f00c626d924;hpb=024fbb5f9682d3187b65849948c372c3879ed9bd 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",