mirror of
https://github.com/curl/curl.git
synced 2026-07-28 09:13:07 +03:00
curl: unify pointer names to global config
Use 'config' for pointing to a OperationConfig Use 'global' for pointing to GlobalConfig Bonus: add config_alloc(), an easier way to allocate + init a new OperationConfig struct. Closes #17888
This commit is contained in:
parent
695eee432f
commit
d516628d14
20 changed files with 110 additions and 123 deletions
|
|
@ -223,9 +223,9 @@ size_t tool_mime_stdin_read(char *buffer,
|
|||
nitems = fread(buffer, 1, nitems, stdin);
|
||||
if(ferror(stdin)) {
|
||||
/* Show error only once. */
|
||||
if(sip->config) {
|
||||
warnf(sip->config, "stdin: %s", strerror(errno));
|
||||
sip->config = NULL;
|
||||
if(sip->global) {
|
||||
warnf(sip->global, "stdin: %s", strerror(errno));
|
||||
sip->global = NULL;
|
||||
}
|
||||
return CURL_READFUNC_ABORT;
|
||||
}
|
||||
|
|
@ -823,7 +823,7 @@ int formparse(struct OperationConfig *config,
|
|||
goto fail;
|
||||
part->headers = headers;
|
||||
headers = NULL;
|
||||
part->config = config->global;
|
||||
part->global = config->global;
|
||||
if(res == CURLE_READ_ERROR) {
|
||||
/* An error occurred while reading stdin: if read has started,
|
||||
issue the error now. Else, delay it until processed by
|
||||
|
|
@ -859,7 +859,7 @@ int formparse(struct OperationConfig *config,
|
|||
goto fail;
|
||||
part->headers = headers;
|
||||
headers = NULL;
|
||||
part->config = config->global;
|
||||
part->global = config->global;
|
||||
if(res == CURLE_READ_ERROR) {
|
||||
/* An error occurred while reading stdin: if read has started,
|
||||
issue the error now. Else, delay it until processed by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue