From 836c28098c517e25084b3ce3fc8eed816e1d9d54 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Wed, 1 Jun 2022 19:54:45 +0200 Subject: [PATCH] Redirect error messages to stderr --- src/configfile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/configfile.c b/src/configfile.c index cdcd578..ac73c54 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -56,7 +56,7 @@ static int get_match(const char *input, const char *pattern, char **match) if (ret) { regerror(ret, &re, err, sizeof(err)); - error_printf("regex error: %s", err); + fprintf(stderr, "regex error: %s", err); return ret; } @@ -269,7 +269,7 @@ void config_file_parse(const int argc, char *argv[]) ret = ini_parse(c->path, data_handler, NULL); if (ret < 0) { - error_printf("Unable to parse configuration file (%d)", ret); + fprintf(stderr, "Error: Unable to parse configuration file (%d)", ret); exit(EXIT_FAILURE); } c->section_name = NULL; @@ -290,7 +290,7 @@ void config_file_parse(const int argc, char *argv[]) ret = ini_parse(c->path, data_handler, NULL); if (ret < 0) { - error_printf("Unable to parse configuration file (%d)", ret); + fprintf(stderr, "Error: Unable to parse configuration file (%d)", ret); exit(EXIT_FAILURE); } }