mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-12 14:21:18 +08:00
sysdeps/posix: Simplify if expression in getaddrinfo
Small code cleanup for better readability.
This commit is contained in:
parent
17832eefee
commit
cceb038ac0
@ -2206,7 +2206,7 @@ getaddrinfo (const char *name, const char *service,
|
||||
{
|
||||
/* If we haven't seen both IPv4 and IPv6 interfaces we can
|
||||
narrow down the search. */
|
||||
if ((! seen_ipv4 || ! seen_ipv6) && (seen_ipv4 || seen_ipv6))
|
||||
if (seen_ipv4 != seen_ipv6)
|
||||
{
|
||||
local_hints = *hints;
|
||||
local_hints.ai_family = seen_ipv4 ? PF_INET : PF_INET6;
|
||||
|
Loading…
x
Reference in New Issue
Block a user