mirror of
https://github.com/curl/curl.git
synced 2026-08-05 13:56:17 +03:00
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
This commit is contained in:
parent
9819984fbb
commit
c6deecd7e9
4 changed files with 17 additions and 16 deletions
|
|
@ -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, ...)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue