X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fidempotent.c;h=bf21b22621339022c17f52448cd213bd5631c4b2;hb=ca951c94fba731b878f5bb3f81bb99c397dc4e12;hp=7ab4a57b7e31080e5630be981de524f4967524c9;hpb=7a163ea2dcafc056fdafc8c71ef011e2bfdbeb65;p=ccan diff --git a/tools/ccanlint/tests/idempotent.c b/tools/ccanlint/tests/idempotent.c index 7ab4a57b..bf21b226 100644 --- a/tools/ccanlint/tests/idempotent.c +++ b/tools/ccanlint/tests/idempotent.c @@ -90,7 +90,6 @@ static bool check_idem(struct ccan_file *f, struct score *score) /* FIXME: We assume small headers probably uninteresting. */ return true; - score->error = "Headers are not idempotent"; for (i = 0; i < f->num_lines; i++) { if (line_info[i].type == DOC_LINE || line_info[i].type == COMMENT_LINE) @@ -184,8 +183,10 @@ static void check_idempotent(struct manifest *m, struct ccan_file *f; list_for_each(&m->h_files, f, list) { - if (!check_idem(f, score)) + if (!check_idem(f, score)) { + score->error = "Headers are not idempotent"; return; + } } score->pass = true; score->score = score->total;