From 6cb2b8495f0da310acf8779db47a3317e9c54707 Mon Sep 17 00:00:00 2001 From: Érico Rolim Date: Wed, 21 Oct 2020 21:13:13 -0300 Subject: imv: fix stdin prompt and use fputs. Add newline to the prompt for reading paths from stdin. Since string formatting isn't being used, it's possible to use fputs() directly in the logging callback in imv.c. --- src/imv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imv.c b/src/imv.c index 100fac3..2a78012 100644 --- a/src/imv.c +++ b/src/imv.c @@ -508,7 +508,7 @@ static void log_to_stderr(enum imv_log_level level, const char *text, void *data { (void)data; if (level >= IMV_INFO) { - fprintf(stderr, "%s", text); + fputs(text, stderr); } } @@ -740,7 +740,7 @@ static void *load_paths_from_stdin(void *data) { struct imv *imv = data; - imv_log(IMV_INFO, "Reading paths from stdin..."); + imv_log(IMV_INFO, "Reading paths from stdin...\n"); char buf[PATH_MAX]; while (fgets(buf, sizeof(buf), stdin) != NULL) { -- cgit v1.2.3