summaryrefslogtreecommitdiffhomepage
path: root/interface-ip.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-04-26 22:40:24 +0200
committerHans Dedecker <dedeckeh@gmail.com>2018-04-26 22:40:24 +0200
commit56cecedb261808f5ea700b92b97590f7fa16de9c (patch)
tree918544e1e418396b6fe0865b726d601eaf9b2db5 /interface-ip.c
parent4f4a8c0895cec56df2141df526a1ee87fdb94a2b (diff)
nterface-ip: remove superfluous iface check in interface_ip_set_enabled()
No need to check iface pointer in interface_ip_set_enabled as the interface is always set by the function __interface_ip_init(). Reported by Coverity in CID 1330437 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'interface-ip.c')
-rw-r--r--interface-ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 27e9e41..1e49fe6 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -1442,7 +1442,7 @@ void interface_ip_set_enabled(struct interface_ip_settings *ip, bool enabled)
if (!strcmp(a->name, ip->iface->name))
interface_set_prefix_address(a, c, ip->iface, enabled);
- if (ip->iface && ip->iface->policy_rules_set != enabled &&
+ if (ip->iface->policy_rules_set != enabled &&
ip->iface->l3_dev.dev) {
set_ip_lo_policy(enabled, true, ip->iface);
set_ip_lo_policy(enabled, false, ip->iface);