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 bc55acf8ddcad0f3c5bd2185131dcb0e6b742c9b..39b73203d26afbc351f1e9d60c15233a595ada1f 100644 (file)
@@ -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++;
         }