]> git.ipfire.org Git - pakfire.git/commitdiff
logger: There can only be one or no newline
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 14 Jun 2021 09:48:36 +0000 (09:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 14 Jun 2021 09:48:36 +0000 (09:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/_pakfire/pakfire.c

index dfb7e2efc9824803d93a2e2eca2326ed97a65d9a..1887847c874be51606954dc64274ca5a0d7fb380 100644 (file)
@@ -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