diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-01-22 12:32:54 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-01-22 12:32:54 +1030 |
commit | 072d358f47ba33b8d6d388fcaf219dc152f79b5d (patch) | |
tree | 89ed1ffdfa3ab65b44b3d203713b67a80486b3a2 | |
parent | c6c779398e42756a7cb1c566e8fd23b955c4775f (diff) |
ccanlint: always print \n at end of error message.
Brad Hards fixed a two places where score->error was not \n-terminated,
and then I found a few more, so make it automatic.
-rw-r--r-- | tools/ccanlint/ccanlint.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index 15d131e2..1c7ee389 100644 --- 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); } |