Skip to contentSkip to conversation

tcp: clean up twisted goto in tcp_rcv_synsent_state_process()

PATCH In review Yoichi Yuasa 2 participants 2 messages Dec 13, 2010

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

PATCH 1/1 tcp: clean up twisted goto in tcp_rcv_synsent_state_process()

---
 net/ipv4/tcp_input.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
net/ipv4/tcp_input.c +4 -4
index 824e8c8..ae4200c 100644
@@ -5623,9 +5623,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
 			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
 						  TCP_DELACK_MAX, TCP_RTO_MAX);
 
-discard:
-			__kfree_skb(skb);
-			return 0;
+			goto discard;
 		} else {
 			tcp_send_ack(sk);
 		}
@@ -5704,7 +5702,9 @@ discard:
 discard_and_undo:
 	tcp_clear_options(&tp->rx_opt);
 	tp->rx_opt.mss_clamp = saved_clamp;
-	goto discard;
+discard:
+	__kfree_skb(skb);
+	return 0;
 
 reset_and_undo:
 	tcp_clear_options(&tp->rx_opt);
Signature · 1 line
1.7.3.3
maintainer
#1 lore raw

From: Yoichi Yuasa <[email protected]>
Date: Mon, 13 Dec 2010 17:11:49 +0900

Quoted 1 line

I've been reading this stretch of code for 5+ years and it's perfectly readable to me and your version is not any more readable than what's there now.

I'm not applying this, sorry.