mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:43:47 +03:00
tool: use errorf() for error output
Convert a number of fprintf() calls.
This commit is contained in:
parent
6d45b9ca9c
commit
741f7ed4bc
10 changed files with 38 additions and 37 deletions
|
|
@ -26,8 +26,8 @@
|
|||
#define CURL_DO_NOT_OVERRIDE_STDERR
|
||||
|
||||
#include "tool_setup.h"
|
||||
|
||||
#include "tool_stderr.h"
|
||||
#include "tool_msgs.h"
|
||||
|
||||
#include "memdebug.h" /* keep this as LAST include */
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ void tool_init_stderr(void)
|
|||
tool_stderr = stderr;
|
||||
}
|
||||
|
||||
void tool_set_stderr_file(char *filename)
|
||||
void tool_set_stderr_file(struct GlobalConfig *global, char *filename)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ void tool_set_stderr_file(char *filename)
|
|||
subsequent freopen will fail. */
|
||||
fp = fopen(filename, FOPEN_WRITETEXT);
|
||||
if(!fp) {
|
||||
fprintf(tool_stderr, "Warning: Failed to open %s!\n", filename);
|
||||
warnf(global, "Warning: Failed to open %s", filename);
|
||||
return;
|
||||
}
|
||||
fclose(fp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue