]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: top has already been derefed
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 31 Jan 2020 15:46:05 +0000 (10:46 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 4 Feb 2020 13:10:52 +0000 (08:10 -0500)
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 <sharpd@cumulusnetworks.com>
zebra/zebra_nhg.c

index 732349a570621f96c7e95e4bd480a5e0fb40c5b6..fb8cfa5c9f4a62f7081b16f5f03c4f61ff806dc9 100644 (file)
@@ -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)