about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-08-08 18:48:05 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-01-04 12:00:12 +0100
commit346d7f942d1a0193792a6eedf696d797fd000369 (patch)
treead721347bcfcc9447682d9f33f91f85b93f44be0
parent84e7ab5b1ba14d60d0d76bb78217e254fd4615cf (diff)
downloadglibc-346d7f942d1a0193792a6eedf696d797fd000369.tar.gz
glibc-346d7f942d1a0193792a6eedf696d797fd000369.tar.xz
glibc-346d7f942d1a0193792a6eedf696d797fd000369.zip
getaddrinfo: Remove unreachable return statement from gaih_inet
(cherry picked from commit 0df595b23a829c9169ec418a19eef9006b4ae801)
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/posix/getaddrinfo.c10
2 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index aa0ddaaa9d..242873b2df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-08  Florian Weimer  <fweimer@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Remove unreachable
+	return statement.
+
 2017-06-24  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #21295]
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index ceb1e0b024..e63a269e36 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -415,13 +415,9 @@ gaih_inet (const char *name, const struct gaih_service *service,
 		    alloca_account (sizeof (struct gaih_servtuple),
 				    alloca_used);
 
-		  if ((rc = gaih_inet_serv (service->name,
-					    tp, req, newp, tmpbuf)))
-		    {
-		      if (rc)
-			continue;
-		      return rc;
-		    }
+		  if (gaih_inet_serv (service->name,
+				      tp, req, newp, tmpbuf) != 0)
+		    continue;
 
 		  *pst = newp;
 		  pst = &(newp->next);