From 9275682559af65ac711a36e9caa3b1d87631d5ab Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 31 Jan 2020 10:46:05 -0500 Subject: [PATCH] zebra: top has already been derefed The top variable has already been derefed by the time we get to the test to see if it is non-NULL. No need to check it. Signed-off-by: Donald Sharp --- zebra/zebra_nhg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 732349a570..fb8cfa5c9f 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1486,7 +1486,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re, * resolved by a route NH1. The exception is if the route is a * host route. */ - if (top && rn == top) + if (rn == top) if (((afi == AFI_IP) && (rn->p.prefixlen != 32)) || ((afi == AFI_IP6) && (rn->p.prefixlen != 128))) { if (IS_ZEBRA_DEBUG_RIB_DETAILED)