diff options
author | Eric Dumazet <edumazet@google.com> | 2013-06-12 17:31:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-12 18:03:24 -0400 |
commit | 7c0cadc69ca2ac8893aa162ee80d92a805840909 (patch) | |
tree | 82423a293189f5b4897a06181f5c1362abb68fee /net/ipv4/udp.c | |
parent | 5b9b6263775d45ccc0c8b27344bfb1a97cf6f725 (diff) |
udp: fix two sparse errors
commit ba418fa357a7b3c ("soreuseport: UDP/IPv4 implementation")
added following sparse errors :
net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:433:60: warning: incorrect type in argument 1 (different base types)
net/ipv4/udp.c:433:60: expected unsigned short [unsigned] [usertype] val
net/ipv4/udp.c:433:60: got restricted __be16 [usertype] sport
net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: incorrect type in argument 1 (different base types)
net/ipv4/udp.c:514:60: expected unsigned short [unsigned] [usertype] val
net/ipv4/udp.c:514:60: got restricted __be16 [usertype] sport
net/ipv4/udp.c:514:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: cast from restricted __be16
Signed-off-by: Eric Dumazet <edumazet@google.com>
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 f65bc32c0266..959502afd8d9 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -430,7 +430,7 @@ begin: | |||
430 | reuseport = sk->sk_reuseport; | 430 | reuseport = sk->sk_reuseport; |
431 | if (reuseport) { | 431 | if (reuseport) { |
432 | hash = inet_ehashfn(net, daddr, hnum, | 432 | hash = inet_ehashfn(net, daddr, hnum, |
433 | saddr, htons(sport)); | 433 | saddr, sport); |
434 | matches = 1; | 434 | matches = 1; |
435 | } | 435 | } |
436 | } else if (score == badness && reuseport) { | 436 | } else if (score == badness && reuseport) { |
@@ -511,7 +511,7 @@ begin: | |||
511 | reuseport = sk->sk_reuseport; | 511 | reuseport = sk->sk_reuseport; |
512 | if (reuseport) { | 512 | if (reuseport) { |
513 | hash = inet_ehashfn(net, daddr, hnum, | 513 | hash = inet_ehashfn(net, daddr, hnum, |
514 | saddr, htons(sport)); | 514 | saddr, sport); |
515 | matches = 1; | 515 | matches = 1; |
516 | } | 516 | } |
517 | } else if (score == badness && reuseport) { | 517 | } else if (score == badness && reuseport) { |