]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
sysdeps/posix: Simplify if expression in getaddrinfo
authorTim Rühsen <tim.ruehsen@gmx.de>
Sun, 24 Nov 2019 19:35:17 +0000 (20:35 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 26 Nov 2019 08:58:50 +0000 (09:58 +0100)
Small code cleanup for better readability.

sysdeps/posix/getaddrinfo.c

index ea127877cb23e05a0e030497a123bb8196025a61..afdcdf0a3b97f2589917152cf5dc7ad64ede735b 100644 (file)
@@ -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;