diff options
-rw-r--r-- | ospf6d/ospf6_route.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index b71b353e1..441a6f367 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -331,8 +331,9 @@ int ospf6_route_get_first_nh_index(struct ospf6_route *route) struct ospf6_nexthop *nh; if (route) { - if ((nh = (struct ospf6_nexthop *)listhead(route->nh_list))) - return (nh->ifindex); + nh = listnode_head(route->nh_list); + if (nh) + return nh->ifindex; } return (-1); |