mirror of
https://github.com/curl/curl.git
synced 2026-08-03 17:50:28 +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
|
|
@ -2989,14 +2989,8 @@ ParameterError parse_args(struct GlobalConfig *global, int argc,
|
|||
|
||||
if(config->url_list && config->url_list->url) {
|
||||
/* Allocate the next config */
|
||||
config->next = malloc(sizeof(struct OperationConfig));
|
||||
config->next = config_alloc(global);
|
||||
if(config->next) {
|
||||
/* Initialise the newly created config */
|
||||
config_init(config->next);
|
||||
|
||||
/* Set the global config pointer */
|
||||
config->next->global = global;
|
||||
|
||||
/* Update the last config pointer */
|
||||
global->last = config->next;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue