From: Michael Tremer Date: Mon, 14 Jun 2021 09:48:36 +0000 (+0000) Subject: logger: There can only be one or no newline X-Git-Tag: 0.9.28~1266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e2e186ba2e6882d42e780a87143c8db94e40d05;p=pakfire.git logger: There can only be one or no newline Signed-off-by: Michael Tremer --- diff --git a/src/_pakfire/pakfire.c b/src/_pakfire/pakfire.c index dfb7e2efc..1887847c8 100644 --- a/src/_pakfire/pakfire.c +++ b/src/_pakfire/pakfire.c @@ -356,7 +356,7 @@ static int __Pakfire_execute_logging_callback(Pakfire pakfire, void* data, } // Remove the trailing newline - while (line && line[length - 1] == '\n') + if (line && line[length - 1] == '\n') length--; // Create tuple with arguments for the callback function