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:
Daniel Stenberg 2019-12-09 16:15:37 +01:00
parent 9819984fbb
commit c6deecd7e9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 17 additions and 16 deletions

View file

@ -166,17 +166,17 @@ static CURLcode main_init(struct GlobalConfig *config)
config->first->global = config;
}
else {
helpf(stderr, "error retrieving curl library information\n");
errorf(config, "error retrieving curl library information\n");
free(config->first);
}
}
else {
helpf(stderr, "error initializing curl library\n");
errorf(config, "error initializing curl library\n");
free(config->first);
}
}
else {
helpf(stderr, "error initializing curl\n");
errorf(config, "error initializing curl\n");
result = CURLE_FAILED_INIT;
}