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:
Kvarec Lezki 2023-02-02 16:07:51 +05:00 committed by Daniel Stenberg
parent 37554d7c07
commit 80c98ef6d2
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -396,6 +396,7 @@ struct Curl_addrinfo *Curl_doh(struct Curl_easy *data,
goto error;
dohp->pending++;
#ifdef ENABLE_IPV6
if((conn->ip_version != CURL_IPRESOLVE_V4) && Curl_ipv6works(data)) {
/* create IPv6 DoH request */
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;
dohp->pending++;
}
#endif
return NULL;
error: