Commit 02005621 authored by Rusty Russell's avatar Rusty Russell

Another Joey fix:

(15:30:58) joeyadams: Also, ccanlint detects "trailing newlines" on empty lines.  Is this a bug, or is 
it policy?
(15:52:03) joeyadams: In my code, I like to keep blank lines in my routines indented to the associated 
level so automatic indent will apply there
parent 7c71ddab
......@@ -5,8 +5,13 @@
static char *report_on_trailing_whitespace(const char *line)
{
if (!strends(line, " ") && !strends(line, "\t"))
return NULL;
const char *e = strchr(line, 0);
while (e>line && (e[-1]==' ' || e[-1]=='\t'))
e--;
if (*e == 0)
return NULL; //there were no trailing spaces
if (e == line)
return NULL; //the line only consists of spaces
if (strlen(line) > 20)
return talloc_asprintf(line, "...'%s'",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment