mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:23:40 +03:00
tidy-up: replace (1 == expressions pton
This commit is contained in:
parent
4034bc7ebf
commit
29e22ef65b
4 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue