From e3bdf3937c8613f3958a5e8beaa8a92ec2da5170 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 21 Jul 2011 14:44:50 +0930 Subject: [PATCH] ccanlint: handle DOS-style \r\n lines when parsing. We don't correctly detect pure-comment lines in ccan/ttxml/ttxml.c without this. --- tools/ccanlint/file_analysis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ccanlint/file_analysis.c b/tools/ccanlint/file_analysis.c index c2021167..d55e2b8c 100644 --- a/tools/ccanlint/file_analysis.c +++ b/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) -- 2.39.2