diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-08-27 05:10:15 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-23 00:18:23 +0200 |
commit | e3b4eadbea77ecb3c3a74d1bc81b392f454c7f2e (patch) | |
tree | a94577b99959414edd2b76d5005b5d361badc5a6 /net/ipv4/udp.c | |
parent | [UDP]: Mark udp_port_rover static. (diff) | |
download | linux-e3b4eadbea77ecb3c3a74d1bc81b392f454c7f2e.tar.xz linux-e3b4eadbea77ecb3c3a74d1bc81b392f454c7f2e.zip |
[UDP]: saddr_cmp function should take const socket pointers
This also kills a warning while building ipv6:
net/ipv6/udp.c: In function ‘udp_v6_get_port’:
net/ipv6/udp.c:66: warning: passing argument 3 of ‘udp_get_port’ from incompatible pointer type
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index aa1823050b00..77e265d7bb8f 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -139,7 +139,7 @@ static inline int udp_lport_inuse(u16 num) * @saddr_comp: AF-dependent comparison of bound local IP addresses */ int udp_get_port(struct sock *sk, unsigned short snum, - int (*saddr_cmp)(struct sock *sk1, struct sock *sk2)) + int (*saddr_cmp)(const struct sock *sk1, const struct sock *sk2)) { struct hlist_node *node; struct hlist_head *head; @@ -210,7 +210,7 @@ fail: return error; } -static inline int ipv4_rcv_saddr_equal(struct sock *sk1, struct sock *sk2) +static inline int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2) { struct inet_sock *inet1 = inet_sk(sk1), *inet2 = inet_sk(sk2); |