about summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/getaddrinfo.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 30cc6364e7..7502e00e6a 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -283,10 +283,12 @@ gaih_inet (const char *name, const struct gaih_service *service,
 	     ((req->ai_socktype != tp->socktype) || !req->ai_socktype) &&
 	     ((req->ai_protocol != tp->protocol) || !req->ai_protocol); tp++);
       if (tp->name == NULL)
-	if (req->ai_socktype)
-	  return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE);
-	else
-	  return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+	{
+	  if (req->ai_socktype)
+	    return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE);
+	  else
+	    return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+	}
     }
 
   if (service != NULL)