From 818dacd78f40da21e8123cdad107904e90e8045d Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Fri, 23 Aug 2019 19:34:10 +0200 Subject: [PATCH] candump: fix formatting of status messages regarding standard output As remarked by Victor in https://github.com/linux-can/can-utils/issues/150 the output in the case of silent mode has puzzled line feeds. Reported-by: Victor Cushman Signed-off-by: Oliver Hartkopp --- candump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/candump.c b/candump.c index 38ce96e..35b39aa 100644 --- a/candump.c +++ b/candump.c @@ -638,9 +638,9 @@ int main(int argc, char **argv) now.tm_sec); if (silent != SILENT_ON) - printf("\nWarning: console output active while logging!"); + fprintf(stderr, "Warning: Console output active while logging!\n"); - fprintf(stderr, "\nEnabling Logfile '%s'\n\n", fname); + fprintf(stderr, "Enabling Logfile '%s'\n", fname); logfile = fopen(fname, "w"); if (!logfile) {