← Commit list

9951a2247e

Stefan Eissing
Stefan Eissing
2026-07-29
SUCCESS Duration: 193s

Subject

tool: remove duplicate setopts

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/config2setopts.c+4 -5
@@ -1120,8 +1120,10 @@ static CURLcode misc_setopts(struct OperationConfig *config, CURL *curl)
CURLcode result = CURLE_OK;
my_setopt_ptr(curl, CURLOPT_STDERR, tool_stderr);
- my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve);
- my_setopt_slist(curl, CURLOPT_CONNECT_TO, config->connect_to);
+ if(config->resolve)
+ my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve);
+ if(config->connect_to)
+ my_setopt_slist(curl, CURLOPT_CONNECT_TO, config->connect_to);
if(config->gssapi_delegation)
my_setopt_long(curl, CURLOPT_GSSAPI_DELEGATION, config->gssapi_delegation);
@@ -1131,9 +1133,6 @@ static CURLcode misc_setopts(struct OperationConfig *config, CURL *curl)
if(config->proto_redir_present)
MY_SETOPT_STR(curl, CURLOPT_REDIR_PROTOCOLS_STR, config->proto_redir_str);
- my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve);
- my_setopt_slist(curl, CURLOPT_CONNECT_TO, config->connect_to);
-
if(config->gssapi_delegation)
my_setopt_long(curl, CURLOPT_GSSAPI_DELEGATION, config->gssapi_delegation);