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 <chipitsine@gmail.com>
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);