[systemd-commits] src/nss-resolve

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Wed Sep 17 11:51:11 PDT 2014


 src/nss-resolve/nss-resolve.c |    5 -----
 1 file changed, 5 deletions(-)

New commits:
commit 4eef5b7441692c962af57eab7bb758f1cfdece35
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Wed Sep 17 20:48:39 2014 +0200

    nss-resolve: remove dead code
    
    ifindex < 0 was already checked before entering the loop
    
    Found by coverity. Fixes: CID#1237609

diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index bc55acf..39b7320 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/nss-resolve/nss-resolve.c
@@ -466,11 +466,6 @@ enum nss_status _nss_resolve_gethostbyname3_r(
                         goto fail;
                 }
 
-                if (ifindex < 0) {
-                        r = -EINVAL;
-                        goto fail;
-                }
-
                 memcpy(r_addr + i*ALIGN(alen), a, alen);
                 i++;
         }



More information about the systemd-commits mailing list