aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorÉrico Rolim <erico.erc@gmail.com>2020-10-21 21:13:13 -0300
committerHarry Jeffery <harry@exec64.co.uk>2020-11-16 22:11:32 +0000
commit6cb2b8495f0da310acf8779db47a3317e9c54707 (patch)
treed5c6d2be3ea1ebffea3768c4ada3e10f2dac016a /src
parentac331f12fa85d4a50da17fe263205abb64a6ec69 (diff)
downloadimv-6cb2b8495f0da310acf8779db47a3317e9c54707.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/imv.c4
1 files 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) {