summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-11-24 20:35:17 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-26 09:58:50 +0100
commitcceb038ac0ea552d5eb81759572a358179fa0fc1 (patch)
tree11d02f692a3710248046b0ddda9c9e6e3535f9b4 /sysdeps/posix
parent17832eefeeafbd448c9e721819a7490f33b0f009 (diff)
downloadglibc-cceb038ac0ea552d5eb81759572a358179fa0fc1.tar.gz
glibc-cceb038ac0ea552d5eb81759572a358179fa0fc1.tar.xz
glibc-cceb038ac0ea552d5eb81759572a358179fa0fc1.zip
sysdeps/posix: Simplify if expression in getaddrinfo
Small code cleanup for better readability.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/getaddrinfo.c2
1 files changed, 1 insertions, 1 deletions
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;