Skip to contentSkip to conversation

ipv4: remove the unnecessary variable in udp_mcast_next

PATCH Applied [email protected] 2 participants 2 messages Jul 11, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv4: remove the unnecessary variable in udp_mcast_next

From: Li RongQing <[email protected]>

---
 net/ipv4/udp.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
net/ipv4/udp.c +4 -5
index d92f94b..ac30e10 100644
@@ -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;
 }
 
 /*
Signature · 1 line
1.7.10.4