diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-12-09 16:15:37 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-12-09 16:15:37 +0100 |
commit | 9729389389153db1a06515848bdf2148e011894b (patch) | |
tree | 858de9c94c5e9c5b3e56017fb44a5c1779b6c269 /src/tool_msgs.c | |
parent | 35c7aac3c61190a4d63a7f0bbbe45e4dd09ba4af (diff) | |
download | curl-9729389389153db1a06515848bdf2148e011894b.tar.gz |
curl: use errorf() betterbagder/curl-errorf
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().
Diffstat (limited to 'src/tool_msgs.c')
-rw-r--r-- | src/tool_msgs.c | 7 |
1 files changed, 4 insertions, 3 deletions
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, ...) { |