Skip to contentSkip to conversation

tcp: remove unnecessary assignment.

PATCH Applied [email protected] 2 participants 2 messages Sep 29, 2014

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

PATCH 1/1 tcp: remove unnecessary assignment.

From: Li RongQing <[email protected]>

This variable i is overwritten to 0 by following code

---
 net/ipv4/tcp_fastopen.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_fastopen.c +1 -1
index 9771563..815c85e 100644
@@ -115,7 +115,7 @@ static bool tcp_fastopen_cookie_gen(struct request_sock *req,
 
 		if (__tcp_fastopen_cookie_gen(&ip6h->saddr, &tmp)) {
 			struct in6_addr *buf = (struct in6_addr *) tmp.val;
-			int i = 4;
+			int i;
 
 			for (i = 0; i < 4; i++)
 				buf->s6_addr32[i] ^= ip6h->daddr.s6_addr32[i];
Signature · 1 line
1.7.10.4