From: Ilya Shipitsin Date: Thu, 5 Apr 2018 20:09:56 +0000 (+0000) Subject: ripd: rip_snmp.c - Remove not needed check X-Git-Tag: frr-5.0-dev~65^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=47e5a60f296d6d8f1fd656c98bf48525a7a7dfc1;p=matthieu%2Ffrr.git ripd: rip_snmp.c - Remove not needed check rn cannot be null here issue detected by cppcheck: [ripd/rip_snmp.c:208] -> [ripd/rip_snmp.c:207]: (warning) Either the condition 'if(rn&&!strncmp(i->name,ifp->name,INTERFACE_NAMSIZ))' is redundant or there is possible null pointer dereference: rn. Signed-off-by: Ilya Shipitsin --- diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c index 917e532e0a..19367638cc 100644 --- a/ripd/rip_snmp.c +++ b/ripd/rip_snmp.c @@ -207,7 +207,7 @@ static int rip_snmp_ifaddr_del(struct connected *ifc) if (!rn) return 0; i = rn->info; - if (rn && !strncmp(i->name, ifp->name, INTERFACE_NAMSIZ)) { + if (!strncmp(i->name, ifp->name, INTERFACE_NAMSIZ)) { rn->info = NULL; route_unlock_node(rn); route_unlock_node(rn);