systemd/0282-nss-resolve-remove-dead-code.patch

29 lines
917 B
Diff
Raw Normal View History

2014-10-04 02:43:52 +00:00
From 4eef5b7441692c962af57eab7bb758f1cfdece35 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Wed, 17 Sep 2014 20:48:39 +0200
Subject: [PATCH] nss-resolve: remove dead code
ifindex < 0 was already checked before entering the loop
Found by coverity. Fixes: CID#1237609
---
src/nss-resolve/nss-resolve.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index bc55acf8dd..39b73203d2 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++;
}