chiark / gitweb /
nss-resolve: remove dead code
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 17 Sep 2014 18:48:39 +0000 (20:48 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 17 Sep 2014 18:50:36 +0000 (20:50 +0200)
ifindex < 0 was already checked before entering the loop

Found by coverity. Fixes: CID#1237609

src/nss-resolve/nss-resolve.c

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