]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: clean up an SA warning in show_ip_route_all 5914/head
authorMark Stapp <mjs@voltanet.io>
Thu, 5 Mar 2020 13:35:55 +0000 (08:35 -0500)
committerMark Stapp <mjs@voltanet.io>
Thu, 5 Mar 2020 13:35:55 +0000 (08:35 -0500)
SA reports a redundant NULL check; remove it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
zebra/zebra_vty.c

index 8c719f4b6a02a53fc22d44d159c4d946c1dc2c84..f903065f447f39eb8aee4d91d5455421685f94ea 100644 (file)
@@ -915,8 +915,8 @@ static void do_show_route_helper(struct vty *vty, struct zebra_vrf *zvrf,
        }
 }
 
-static void do_show_ip_route_all(struct vty *vty, struct zebra_vrf *zvrf, afi_t afi,
-                                bool use_fib, bool use_json,
+static void do_show_ip_route_all(struct vty *vty, struct zebra_vrf *zvrf,
+                                afi_t afi, bool use_fib, bool use_json,
                                 route_tag_t tag,
                                 const struct prefix *longer_prefix_p,
                                 bool supernets_only, int type,
@@ -934,12 +934,12 @@ static void do_show_ip_route_all(struct vty *vty, struct zebra_vrf *zvrf, afi_t
                if (zrt->afi != afi ||
                    zrt->safi != SAFI_UNICAST)
                        continue;
-               if (zrt->table)
-                       do_show_ip_route(vty, zvrf_name(zvrf), afi,
-                                        SAFI_UNICAST, use_fib, use_json,
-                                        tag, longer_prefix_p,
-                                        supernets_only, type,
-                                        ospf_instance_id, zrt->tableid);
+
+               do_show_ip_route(vty, zvrf_name(zvrf), afi,
+                                SAFI_UNICAST, use_fib, use_json,
+                                tag, longer_prefix_p,
+                                supernets_only, type,
+                                ospf_instance_id, zrt->tableid);
        }
 }