mirror of
https://github.com/curl/curl.git
synced 2024-12-03 06:20:31 +08:00
tool_operate: simplify return code handling from url_proto()
The additional checks were superfluous as it would only ever return error if one of those protocols were set. Also: a returned error *should* mean get out of there, without having to check more conditions. Closes #14104
This commit is contained in:
parent
bf88cdb790
commit
655557f2b3
@ -1338,9 +1338,8 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
||||
if(result)
|
||||
break;
|
||||
|
||||
/* result is only used when for ipfs and ipns, ignored otherwise */
|
||||
result = url_proto(&per->this_url, config, &use_proto);
|
||||
if(result && (use_proto == proto_ipfs || use_proto == proto_ipns))
|
||||
if(result)
|
||||
break;
|
||||
|
||||
#ifndef DEBUGBUILD
|
||||
|
Loading…
Reference in New Issue
Block a user