]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: rt_netlink nexthop handling checkpatch
authorStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:11:06 +0000 (11:11 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:44 +0000 (11:13 -0400)
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 <sworley@cumulusnetworks.com>
zebra/rt_netlink.c

index b5ddc954c3aca87f2c1c146baf4e23dad62af6c1..640802fe316c720ed44954a506178fa8cd620683 100644 (file)
@@ -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);