From f05b0b97335be1b4f9f1f1044eb617f4e12c681e Mon Sep 17 00:00:00 2001 From: Benjamin Poirier Date: Mon, 29 Nov 2021 15:23:16 +0900 Subject: net: mpls: Make for_nexthops iterator const There are separate for_nexthops and change_nexthops iterators. The for_nexthops variant should use const. Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller --- net/mpls/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/mpls/internal.h') diff --git a/net/mpls/internal.h b/net/mpls/internal.h index 218138f5b491..56c5cad3a230 100644 --- a/net/mpls/internal.h +++ b/net/mpls/internal.h @@ -158,7 +158,7 @@ struct mpls_route { /* next hop label forwarding entry */ }; #define for_nexthops(rt) { \ - int nhsel; struct mpls_nh *nh; \ + int nhsel; const struct mpls_nh *nh; \ for (nhsel = 0, nh = (rt)->rt_nh; \ nhsel < (rt)->rt_nhn; \ nh = (void *)nh + (rt)->rt_nh_size, nhsel++) -- cgit v1.2.3