projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c6c7793
)
ccanlint: always print \n at end of error message.
author
Rusty Russell
<rusty@rustcorp.com.au>
Sat, 22 Jan 2011 02:02:54 +0000
(12:32 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Sat, 22 Jan 2011 02:02:54 +0000
(12:32 +1030)
Brad Hards fixed a two places where score->error was not \n-terminated,
and then I found a few more, so make it automatic.
tools/ccanlint/ccanlint.c
patch
|
blob
|
history
diff --git
a/tools/ccanlint/ccanlint.c
b/tools/ccanlint/ccanlint.c
index 15d131e20073c2106ec2963d07a2ed76c5492730..1c7ee389dbc75728d35091e23a7d0c5a4463a469 100644
(file)
--- a/
tools/ccanlint/ccanlint.c
+++ b/
tools/ccanlint/ccanlint.c
@@
-149,8
+149,10
@@
static bool run_test(struct ccanlint *i,
}
if ((!quiet && !score->pass) || verbose) {
- if (score->error)
- printf("%s", score->error);
+ if (score->error) {
+ printf("%s%s", score->error,
+ strends(score->error, "\n") ? "" : "\n");
+ }
if (!quiet && !score->pass && i->handle)
i->handle(m, score);
}