summaryrefslogtreecommitdiffstats
path: root/net/mpls/internal.h
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@nvidia.com>2021-11-29 15:23:16 +0900
committerDavid S. Miller <davem@davemloft.net>2021-11-29 12:46:52 +0000
commitf05b0b97335be1b4f9f1f1044eb617f4e12c681e (patch)
treefe661f83873343524c566a38fe6e5142e1ed3394 /net/mpls/internal.h
parent69d9c0d07726b6d49cf8b2609226b7b88a0f3d51 (diff)
downloadlinux-f05b0b97335be1b4f9f1f1044eb617f4e12c681e.tar.bz2
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 <bpoirier@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mpls/internal.h')
-rw-r--r--net/mpls/internal.h2
1 files changed, 1 insertions, 1 deletions
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++)