tool_operate: simplify single_transfer

- let the caller do the cleanup on fail
- avoid gotos and use direct returns more
- use while() loop

Closes #18077
This commit is contained in:
Daniel Stenberg 2025-07-29 13:29:25 +02:00
parent 6b70e8a838
commit b2ccfbf2fb
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 84 additions and 113 deletions

View file

@ -74,7 +74,7 @@ struct State {
curl_off_t infilenum; /* number of files to upload */
curl_off_t up; /* upload file counter within a single upload glob */
curl_off_t urlnum; /* how many iterations this URL has with ranges etc */
curl_off_t li;
curl_off_t li; /* index for globbed URLs */
};
struct OperationConfig {