From cceb038ac0ea552d5eb81759572a358179fa0fc1 Mon Sep 17 00:00:00 2001 From: Tim Rühsen Date: Sun, 24 Nov 2019 20:35:17 +0100 Subject: sysdeps/posix: Simplify if expression in getaddrinfo Small code cleanup for better readability. --- sysdeps/posix/getaddrinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index ea127877cb..afdcdf0a3b 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -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; -- cgit 1.4.1