From f3354e1612197b9e72ef47b18979b0a5e9db0feb Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Fri, 25 Oct 2019 11:11:06 -0400 Subject: [PATCH] zebra: rt_netlink nexthop handling checkpatch Checkpatch was complaining because this code was extending beyond 80 characters on a couple lines. Adjusted a conditional tree to fix that. Signed-off-by: Stephen Worley --- zebra/rt_netlink.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index b5ddc954c3..640802fe31 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -452,23 +452,20 @@ static uint8_t parse_multipath_nexthops_unicast(ns_id_t ns_id, } } - if (gate) { - if (rtm->rtm_family == AF_INET) { - if (index) - nh = route_entry_nexthop_ipv4_ifindex_add( - re, gate, prefsrc, index, - nh_vrf_id); - else - nh = route_entry_nexthop_ipv4_add( - re, gate, prefsrc, nh_vrf_id); - } else if (rtm->rtm_family == AF_INET6) { - if (index) - nh = route_entry_nexthop_ipv6_ifindex_add( - re, gate, index, nh_vrf_id); - else - nh = route_entry_nexthop_ipv6_add( - re, gate, nh_vrf_id); - } + if (gate && rtm->rtm_family == AF_INET) { + if (index) + nh = route_entry_nexthop_ipv4_ifindex_add( + re, gate, prefsrc, index, nh_vrf_id); + else + nh = route_entry_nexthop_ipv4_add( + re, gate, prefsrc, nh_vrf_id); + } else if (gate && rtm->rtm_family == AF_INET6) { + if (index) + nh = route_entry_nexthop_ipv6_ifindex_add( + re, gate, index, nh_vrf_id); + else + nh = route_entry_nexthop_ipv6_add(re, gate, + nh_vrf_id); } else nh = route_entry_nexthop_ifindex_add(re, index, nh_vrf_id); -- 2.39.5