doh: ifdef IPv6 code
For disabled IPv6 a condition (conn->ip_version != CURL_IPRESOLVE_V4) is always false. https://pvs-studio.com/en/docs/warnings/v560/ Closes #10397
This commit is contained in:
parent
37554d7c07
commit
80c98ef6d2
@ -396,6 +396,7 @@ struct Curl_addrinfo *Curl_doh(struct Curl_easy *data,
|
|||||||
goto error;
|
goto error;
|
||||||
dohp->pending++;
|
dohp->pending++;
|
||||||
|
|
||||||
|
#ifdef ENABLE_IPV6
|
||||||
if((conn->ip_version != CURL_IPRESOLVE_V4) && Curl_ipv6works(data)) {
|
if((conn->ip_version != CURL_IPRESOLVE_V4) && Curl_ipv6works(data)) {
|
||||||
/* create IPv6 DoH request */
|
/* create IPv6 DoH request */
|
||||||
result = dohprobe(data, &dohp->probe[DOH_PROBE_SLOT_IPADDR_V6],
|
result = dohprobe(data, &dohp->probe[DOH_PROBE_SLOT_IPADDR_V6],
|
||||||
@ -405,6 +406,7 @@ struct Curl_addrinfo *Curl_doh(struct Curl_easy *data,
|
|||||||
goto error;
|
goto error;
|
||||||
dohp->pending++;
|
dohp->pending++;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user