]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/no_trailing_whitespace.c
tools: fix up warnings with -Wwrite-strings.
[ccan] / tools / ccanlint / tests / no_trailing_whitespace.c
index a66fd74c3c57a8fdd7f42f352975bbe681366665..3f41877a31a42a4302fb1c8eb8ff44143450da67 100644 (file)
@@ -35,11 +35,9 @@ static void check_trailing_whitespace(struct manifest *m,
                        char **lines = get_ccan_file_lines(f);
                        for (i = 0; i < f->num_lines; i++) {
                                char *err = get_trailing_whitespace(lines[i]);
-                               if (err) {
-                                       score->error = "Trailing whitespace"
-                                               " found";
-                                       score_file_error(score, f, i+1, err);
-                               }
+                               if (err)
+                                       score_file_error(score, f, i+1,
+                                                        "%s", err);
                        }
                }
        }