aboutsummaryrefslogtreecommitdiff
path: root/src/tool_msgs.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-12-09 16:15:37 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-12-10 10:03:33 +0100
commitc6deecd7e9ea7dd10de0934f8ec30952648aba2d (patch)
treed0d784efffbb6eeb0f06afca3f1e779ad928d0f5 /src/tool_msgs.c
parent9819984fbb04968dcec53a65ae0dfae23111dd18 (diff)
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
Diffstat (limited to 'src/tool_msgs.c')
-rw-r--r--src/tool_msgs.c7
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, ...)
{