]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_operate: cleanups
authorDaniel Stenberg <daniel@haxx.se>
Thu, 7 Aug 2025 21:11:10 +0000 (23:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 8 Aug 2025 09:43:28 +0000 (11:43 +0200)
commitda27db068fc888d7091d34708096bc8083f46554
tree34ae0c6d05b2af8b4e8cec7337234d4de49e66ce
parent065a6531583d58b4f2fdf81e83863ccf3158ff7f
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
src/tool_cfgable.c
src/tool_cfgable.h
src/tool_operate.c
src/tool_operate.h
src/tool_operhlp.c