mirror of
https://github.com/curl/curl.git
synced 2026-07-29 04:23:08 +03:00
tool_operate: cleanups
- move the state struct from config to global. It is used as a single instance anyway so might as well be a single one to save memory. - simplify and combine several conditions - set default retry delay inititally - use better struct field names to make it easier to understand their purposes - remove the state->outfiles field as it was not necessary - remove superfluous glob cleanup call - move conditions around to remove an indent level - move the ->url NULL check Takes single_transfer()'s complexity score down from 78 to 68. Closes #18226
This commit is contained in:
parent
065a653158
commit
da27db068f
5 changed files with 204 additions and 252 deletions
|
|
@ -80,7 +80,7 @@ struct per_transfer {
|
|||
};
|
||||
|
||||
CURLcode operate(int argc, argv_item_t argv[]);
|
||||
void single_transfer_cleanup(struct OperationConfig *config);
|
||||
void single_transfer_cleanup(void);
|
||||
|
||||
extern struct per_transfer *transfers; /* first node */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue