From 072d358f47ba33b8d6d388fcaf219dc152f79b5d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 22 Jan 2011 12:32:54 +1030 Subject: [PATCH] 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. --- tools/ccanlint/ccanlint.c | 6 ++++-- 1 file 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); } -- 2.39.2