diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-04-22 04:53:02 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-22 11:04:14 -0700 |
commit | b71d1d426d263b0b6cb5760322efebbfc89d4463 (patch) | |
tree | 226ca7390bd6187ec9139d2ccedd26fd94d8e57a /net/ipv6/icmp.c | |
parent | 5f8629c526b4f7e529a6d27bbd802c0dc7fcc357 (diff) | |
download | linux-3.10-b71d1d426d263b0b6cb5760322efebbfc89d4463.tar.gz linux-3.10-b71d1d426d263b0b6cb5760322efebbfc89d4463.tar.bz2 linux-3.10-b71d1d426d263b0b6cb5760322efebbfc89d4463.zip |
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/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 83cb4f9add8..11900417b1c 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -372,7 +372,7 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) struct ipv6hdr *hdr = ipv6_hdr(skb); struct sock *sk; struct ipv6_pinfo *np; - struct in6_addr *saddr = NULL; + const struct in6_addr *saddr = NULL; struct dst_entry *dst; struct icmp6hdr tmp_hdr; struct flowi6 fl6; @@ -521,7 +521,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) struct sock *sk; struct inet6_dev *idev; struct ipv6_pinfo *np; - struct in6_addr *saddr = NULL; + const struct in6_addr *saddr = NULL; struct icmp6hdr *icmph = icmp6_hdr(skb); struct icmp6hdr tmp_hdr; struct flowi6 fl6; @@ -645,8 +645,8 @@ static int icmpv6_rcv(struct sk_buff *skb) { struct net_device *dev = skb->dev; struct inet6_dev *idev = __in6_dev_get(dev); - struct in6_addr *saddr, *daddr; - struct ipv6hdr *orig_hdr; + const struct in6_addr *saddr, *daddr; + const struct ipv6hdr *orig_hdr; struct icmp6hdr *hdr; u8 type; |