summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/if.c b/lib/if.c
index 08d8918742..48c01af882 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -98,8 +98,8 @@ int if_cmp_name_func(const char *p1, const char *p2)
if (!*p2)
return 1;
- x1 = strtol(p1, (char **)&tmp1, 10);
- x2 = strtol(p2, (char **)&tmp2, 10);
+ x1 = strtol(p1, &tmp1, 10);
+ x2 = strtol(p2, &tmp2, 10);
/* let's compare numbers now */
if (x1 < x2)
@@ -1028,6 +1028,7 @@ void if_terminate(struct vrf *vrf)
if (ifp->node) {
ifp->node->info = NULL;
route_unlock_node(ifp->node);
+ ifp->node = NULL;
}
if_delete(&ifp);
}