]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/no_trailing_whitespace.c
ccanlint: remove redundant num_lines in struct ccan_file.
[ccan] / tools / ccanlint / tests / no_trailing_whitespace.c
index bba51d8c5a3acd9e65c76044ee09194046ae7193..60ecee7962aae030b6570af27790b2a4c67ff7fd 100644 (file)
@@ -34,7 +34,7 @@ static void check_trailing_whitespace(struct manifest *m,
        foreach_ptr(list, &m->c_files, &m->h_files) {
                list_for_each(list, f, list) {
                        char **lines = get_ccan_file_lines(f);
-                       for (i = 0; i < f->num_lines; i++) {
+                       for (i = 0; f->lines[i]; i++) {
                                char *err = get_trailing_whitespace(score,
                                                                    lines[i]);
                                if (err)