mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:03:39 +03:00
tool: Moved --stderr to the global config
This commit is contained in:
parent
1f07718123
commit
5513bbd5c3
12 changed files with 69 additions and 68 deletions
|
|
@ -132,6 +132,7 @@ static CURLcode main_init(struct GlobalConfig *config)
|
|||
|
||||
/* Initialise the global config */
|
||||
config->showerror = -1; /* Will show errors */
|
||||
config->errors = stderr; /* Default errors to stderr */
|
||||
|
||||
/* Allocate the initial operate config */
|
||||
config->first = config->last = malloc(sizeof(struct OperationConfig));
|
||||
|
|
@ -179,6 +180,10 @@ static void free_config_fields(struct GlobalConfig *config)
|
|||
{
|
||||
Curl_safefree(config->trace_dump);
|
||||
|
||||
if(config->errors_fopened && config->errors)
|
||||
fclose(config->errors);
|
||||
config->errors = NULL;
|
||||
|
||||
if(config->trace_fopened && config->trace_stream)
|
||||
fclose(config->trace_stream);
|
||||
config->trace_stream = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue