tidy-up: replace (1 == expressions pton

This commit is contained in:
Viktor Szakats 2025-07-09 19:41:34 +02:00
parent 4034bc7ebf
commit 29e22ef65b
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 6 additions and 6 deletions

View file

@ -114,8 +114,8 @@ struct Curl_addrinfo *Curl_sync_getaddrinfo(struct Curl_easy *data,
* The AI_NUMERICHOST must not be set to get synthesized IPv6 address from
* an IPv4 address on iOS and macOS.
*/
if((1 == curlx_inet_pton(AF_INET, hostname, addrbuf)) ||
(1 == curlx_inet_pton(AF_INET6, hostname, addrbuf))) {
if((curlx_inet_pton(AF_INET, hostname, addrbuf) == 1) ||
(curlx_inet_pton(AF_INET6, hostname, addrbuf) == 1)) {
/* the given address is numerical only, prevent a reverse lookup */
hints.ai_flags = AI_NUMERICHOST;
}