Browse Source

ccanlint: handle DOS-style \r\n lines when parsing.

We don't correctly detect pure-comment lines in ccan/ttxml/ttxml.c
without this.
Rusty Russell 14 years ago
parent
commit
e3bdf3937c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/ccanlint/file_analysis.c

+ 1 - 1
tools/ccanlint/file_analysis.c

@@ -349,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)