From c6deecd7e9ea7dd10de0934f8ec30952648aba2d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 9 Dec 2019 16:15:37 +0100 Subject: curl: use errorf() better Change series of error outputs to use errorf(). Only errors that are due to mistakes in command line option usage should use helpf(), other types of errors in the tool should rather use errorf(). Closes #4691 --- src/tool_msgs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/tool_msgs.c') diff --git a/src/tool_msgs.c b/src/tool_msgs.c index c0e85aee6..48877b30d 100644 --- a/src/tool_msgs.c +++ b/src/tool_msgs.c @@ -105,9 +105,9 @@ void warnf(struct GlobalConfig *config, const char *fmt, ...) va_end(ap); } /* - * Emit help formatted message on given stream. + * Emit help formatted message on given stream. This is for errors with or + * related to command line arguments. */ - void helpf(FILE *errors, const char *fmt, ...) { if(fmt) { @@ -125,7 +125,8 @@ void helpf(FILE *errors, const char *fmt, ...) } /* - * Emit error message on error stream if not muted. + * Emit error message on error stream if not muted. When errors are not tied + * to command line arguments, use helpf() for such errors. */ void errorf(struct GlobalConfig *config, const char *fmt, ...) { -- cgit v1.2.3