Skip to content

Commit

Permalink
ipv4: remove the unnecessary variable in udp_mcast_next
Browse files Browse the repository at this point in the history
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Li RongQing authored and David S. Miller committed Jul 11, 2014
1 parent a0077a9 commit a2f983f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,19 +600,18 @@ static inline struct sock *udp_v4_mcast_next(struct net *net, struct sock *sk,
int dif)
{
struct hlist_nulls_node *node;
struct sock *s = sk;
unsigned short hnum = ntohs(loc_port);

sk_nulls_for_each_from(s, node) {
if (__udp_is_mcast_sock(net, s,
sk_nulls_for_each_from(sk, node) {
if (__udp_is_mcast_sock(net, sk,
loc_port, loc_addr,
rmt_port, rmt_addr,
dif, hnum))
goto found;
}
s = NULL;
sk = NULL;
found:
return s;
return sk;
}

/*
Expand Down

0 comments on commit a2f983f

Please sign in to comment.