curl: remove first argument from helpf()

It was always the same and it is a global already!

Closes #18221
This commit is contained in:
Daniel Stenberg 2025-08-07 16:12:44 +02:00
parent 16eac53dc9
commit 02b22ee4ea
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 15 additions and 15 deletions

View file

@ -113,18 +113,18 @@ void warnf(const char *fmt, ...)
* 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, ...)
void helpf(const char *fmt, ...)
{
if(fmt) {
va_list ap;
va_start(ap, fmt);
DEBUGASSERT(!strchr(fmt, '\n'));
fputs("curl: ", errors); /* prefix it */
vfprintf(errors, fmt, ap);
fputs("curl: ", tool_stderr); /* prefix it */
vfprintf(tool_stderr, fmt, ap);
va_end(ap);
fputs("\n", errors); /* newline it */
fputs("\n", tool_stderr); /* newline it */
}
fprintf(errors, "curl: try 'curl --help' "
fprintf(tool_stderr, "curl: try 'curl --help' "
#ifdef USE_MANUAL
"or 'curl --manual' "
#endif