X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fexamples_run.c;h=23a3844a5bb7d0d153bb2f55cb638107e77b3a79;hb=f6067e4cbd7b7415571f12438aec00faec5657fb;hp=077ea2487b431a1f365702f94b9ff4f78473df5d;hpb=016a19d260cd7f4afeb5b2b2cc28c8bbed1cd170;p=ccan diff --git a/tools/ccanlint/tests/examples_run.c b/tools/ccanlint/tests/examples_run.c index 077ea248..23a3844a 100644 --- a/tools/ccanlint/tests/examples_run.c +++ b/tools/ccanlint/tests/examples_run.c @@ -36,10 +36,10 @@ static bool scan_forv(const void *ctx, va_copy(ap, *args); - if (isspace(fmt[0])) { + if (cisspace(fmt[0])) { /* One format space can swallow many input spaces */ ret = false; - while (isspace(input[0])) { + while (cisspace(input[0])) { if (scan_forv(ctx, ++input, fmt+1, &ap)) { ret = true; break; @@ -247,24 +247,20 @@ static void run_examples(struct manifest *m, bool keep, linenum++, expect = find_expect(i, lines, &input, &exact, &linenum)) { - char *err; - score->total++; if (i->compiled == NULL) continue; + score->total++; output = unexpected(i, input, expect, exact); if (!output) { score->score++; continue; } - err = talloc_asprintf(score, - "output '%s' didn't" - " %s '%s'\n", - output, - exact - ? "match" : "contain", - expect); - score_file_error(score, i, linenum+1, err); + score_file_error(score, i, linenum+1, + "output '%s' didn't %s '%s'\n", + output, + exact ? "match" : "contain", + expect); score->pass = false; } }