From 56cecedb261808f5ea700b92b97590f7fa16de9c Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Thu, 26 Apr 2018 22:40:24 +0200 Subject: 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 --- interface-ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3