diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-04-22 00:53:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-22 14:04:14 -0400 |
commit | b71d1d426d263b0b6cb5760322efebbfc89d4463 (patch) | |
tree | 226ca7390bd6187ec9139d2ccedd26fd94d8e57a /net/xfrm | |
parent | 5f8629c526b4f7e529a6d27bbd802c0dc7fcc357 (diff) |
inet: constify ip headers and in6_addr
Add const qualifiers to structs iphdr, ipv6hdr and in6_addr pointers
where possible, to make code intention more obvious.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_state.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index dd78536d40d..d70f85eb786 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -1036,15 +1036,15 @@ static struct xfrm_state *__find_acq_core(struct net *net, struct xfrm_mark *m, | |||
1036 | 1036 | ||
1037 | case AF_INET6: | 1037 | case AF_INET6: |
1038 | ipv6_addr_copy((struct in6_addr *)x->sel.daddr.a6, | 1038 | ipv6_addr_copy((struct in6_addr *)x->sel.daddr.a6, |
1039 | (struct in6_addr *)daddr); | 1039 | (const struct in6_addr *)daddr); |
1040 | ipv6_addr_copy((struct in6_addr *)x->sel.saddr.a6, | 1040 | ipv6_addr_copy((struct in6_addr *)x->sel.saddr.a6, |
1041 | (struct in6_addr *)saddr); | 1041 | (const struct in6_addr *)saddr); |
1042 | x->sel.prefixlen_d = 128; | 1042 | x->sel.prefixlen_d = 128; |
1043 | x->sel.prefixlen_s = 128; | 1043 | x->sel.prefixlen_s = 128; |
1044 | ipv6_addr_copy((struct in6_addr *)x->props.saddr.a6, | 1044 | ipv6_addr_copy((struct in6_addr *)x->props.saddr.a6, |
1045 | (struct in6_addr *)saddr); | 1045 | (const struct in6_addr *)saddr); |
1046 | ipv6_addr_copy((struct in6_addr *)x->id.daddr.a6, | 1046 | ipv6_addr_copy((struct in6_addr *)x->id.daddr.a6, |
1047 | (struct in6_addr *)daddr); | 1047 | (const struct in6_addr *)daddr); |
1048 | break; | 1048 | break; |
1049 | } | 1049 | } |
1050 | 1050 | ||
@@ -2092,8 +2092,8 @@ static void xfrm_audit_helper_sainfo(struct xfrm_state *x, | |||
2092 | static void xfrm_audit_helper_pktinfo(struct sk_buff *skb, u16 family, | 2092 | static void xfrm_audit_helper_pktinfo(struct sk_buff *skb, u16 family, |
2093 | struct audit_buffer *audit_buf) | 2093 | struct audit_buffer *audit_buf) |
2094 | { | 2094 | { |
2095 | struct iphdr *iph4; | 2095 | const struct iphdr *iph4; |
2096 | struct ipv6hdr *iph6; | 2096 | const struct ipv6hdr *iph6; |
2097 | 2097 | ||
2098 | switch (family) { | 2098 | switch (family) { |
2099 | case AF_INET: | 2099 | case AF_INET: |