From a0add632c1ea61f37f31b717921e96984ca23947 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 27 Sep 2020 12:31:16 +0200 Subject: main: use fprintf() for usage errors --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 91ce9e1..6f8192e 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -312,7 +313,7 @@ int main(int argc, const char *const *argv) { if (argc < 2) { - LOG_ERR("missing required argument: image path"); + fprintf(stderr, "error: missing required argument: image path\n"); return EXIT_FAILURE; } @@ -328,7 +329,7 @@ main(int argc, const char *const *argv) image = png_load(image_path); #endif if (image == NULL) { - LOG_ERR("%s: failed to load", image_path); + fprintf(stderr, "error: %s: failed to load\n", image_path); return EXIT_FAILURE; } -- cgit v1.2.3