]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/file_analysis.c
ccanlint: tests_pass_valgrind_noleaks: handle FAIL option on tests.
[ccan] / tools / ccanlint / file_analysis.c
index 7ce65479bde929cb3e036ff73514522a9f4cddad..d55e2b8c12bebd7b4d4062ed93b1d7350ae8216e 100644 (file)
@@ -86,6 +86,7 @@ struct ccan_file *new_ccan_file(const void *ctx, const char *dir, char *name)
        f->fullname = talloc_asprintf(f, "%s/%s", dir, f->name);
        f->contents = NULL;
        f->cov_compiled = NULL;
+       f->simplified = NULL;
        return f;
 }
 
@@ -348,7 +349,7 @@ static char *remove_comments(const char *line, bool in_comment,
 
 static bool is_empty(const char *line)
 {
-       return strspn(line, " \t") == strlen(line);
+       return strspn(line, " \r\t") == strlen(line);
 }
 
 static bool continues(const char *line)