From: Benjamin Poirier Date: Mon, 29 Nov 2021 06:23:15 +0000 (+0900) Subject: net: mpls: Remove duplicate variable from iterator macro X-Git-Tag: howlett/maple/20220722_2~1498^2~321^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=69d9c0d07726b6d49cf8b2609226b7b88a0f3d51;p=users%2Fjedix%2Flinux-maple.git net: mpls: Remove duplicate variable from iterator macro __nh is just a copy of nh with a different type. Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller --- diff --git a/net/mpls/internal.h b/net/mpls/internal.h index 838cdfc10e47..218138f5b491 100644 --- a/net/mpls/internal.h +++ b/net/mpls/internal.h @@ -158,17 +158,16 @@ struct mpls_route { /* next hop label forwarding entry */ }; #define for_nexthops(rt) { \ - int nhsel; struct mpls_nh *nh; u8 *__nh; \ - for (nhsel = 0, nh = (rt)->rt_nh, __nh = (u8 *)((rt)->rt_nh); \ + int nhsel; struct mpls_nh *nh; \ + for (nhsel = 0, nh = (rt)->rt_nh; \ nhsel < (rt)->rt_nhn; \ - __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++) + nh = (void *)nh + (rt)->rt_nh_size, nhsel++) #define change_nexthops(rt) { \ - int nhsel; struct mpls_nh *nh; u8 *__nh; \ - for (nhsel = 0, nh = (struct mpls_nh *)((rt)->rt_nh), \ - __nh = (u8 *)((rt)->rt_nh); \ + int nhsel; struct mpls_nh *nh; \ + for (nhsel = 0, nh = (rt)->rt_nh; \ nhsel < (rt)->rt_nhn; \ - __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++) + nh = (void *)nh + (rt)->rt_nh_size, nhsel++) #define endfor_nexthops(rt) }