From: Rusty Russell Date: Sat, 22 Jan 2011 02:02:54 +0000 (+1030) Subject: ccanlint: always print \n at end of error message. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=072d358f47ba33b8d6d388fcaf219dc152f79b5d 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. --- 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); }