diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-11-13 04:12:13 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:15 +0100 |
commit | 8e7702bc34d71064e4c2f137021c4efa4c8d2f64 (patch) | |
tree | e33acf3c7a0499cc0a2a0f12c098b7c2fa93b87d /zebra/zebra_fpm_netlink.c | |
parent | pimd: Removing impossible code (diff) | |
download | frr-8e7702bc34d71064e4c2f137021c4efa4c8d2f64.tar.xz frr-8e7702bc34d71064e4c2f137021c4efa4c8d2f64.zip |
zebra: Cleanup zebra_static CLANG/SA issues.
When compiling using CLANG's SA, cleanup the
SA issues found.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_fpm_netlink.c')
-rw-r--r-- | zebra/zebra_fpm_netlink.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c index 5dd08ca78..771bd837d 100644 --- a/zebra/zebra_fpm_netlink.c +++ b/zebra/zebra_fpm_netlink.c @@ -255,10 +255,15 @@ netlink_route_info_fill (netlink_route_info_t *ri, int cmd, * particularly in our communication with the FPM. */ if (cmd == RTM_DELROUTE && !rib) - goto skip; + return 1; - if (rib) - ri->rtm_protocol = netlink_proto_from_route_type (rib->type); + if (!rib) + { + zfpm_debug ("%s: Expected non-NULL rib pointer", __PRETTY_FUNCTION__); + return 0; + } + + ri->rtm_protocol = netlink_proto_from_route_type (rib->type); if ((rib->flags & ZEBRA_FLAG_BLACKHOLE) || (rib->flags & ZEBRA_FLAG_REJECT)) discard = 1; @@ -283,9 +288,7 @@ netlink_route_info_fill (netlink_route_info_t *ri, int cmd, ri->metric = &rib->metric; if (discard) - { - goto skip; - } + return 1; for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing)) { @@ -311,7 +314,6 @@ netlink_route_info_fill (netlink_route_info_t *ri, int cmd, return 0; } - skip: return 1; } |