tcp: Remove 2 indentation levels in tcp_rcv_state_process
case TCP_FIN_WAIT1 can also be simplified by reversing tests and adding breaks; Add braces after case and move automatic definitions. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
61eb900352
commit
c48b22daa6
@@ -5670,7 +5670,10 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
|||||||
tcp_fast_path_on(tp);
|
tcp_fast_path_on(tp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TCP_FIN_WAIT1:
|
case TCP_FIN_WAIT1: {
|
||||||
|
struct dst_entry *dst;
|
||||||
|
int tmo;
|
||||||
|
|
||||||
/* If we enter the TCP_FIN_WAIT1 state and we are a
|
/* If we enter the TCP_FIN_WAIT1 state and we are a
|
||||||
* Fast Open socket and this is the first acceptable
|
* Fast Open socket and this is the first acceptable
|
||||||
* ACK we have received, this would have acknowledged
|
* ACK we have received, this would have acknowledged
|
||||||
@@ -5689,8 +5692,8 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
|||||||
reqsk_fastopen_remove(sk, req, false);
|
reqsk_fastopen_remove(sk, req, false);
|
||||||
tcp_rearm_rto(sk);
|
tcp_rearm_rto(sk);
|
||||||
}
|
}
|
||||||
if (tp->snd_una == tp->write_seq) {
|
if (tp->snd_una != tp->write_seq)
|
||||||
struct dst_entry *dst;
|
break;
|
||||||
|
|
||||||
tcp_set_state(sk, TCP_FIN_WAIT2);
|
tcp_set_state(sk, TCP_FIN_WAIT2);
|
||||||
sk->sk_shutdown |= SEND_SHUTDOWN;
|
sk->sk_shutdown |= SEND_SHUTDOWN;
|
||||||
@@ -5702,8 +5705,8 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
|||||||
if (!sock_flag(sk, SOCK_DEAD)) {
|
if (!sock_flag(sk, SOCK_DEAD)) {
|
||||||
/* Wake up lingering close() */
|
/* Wake up lingering close() */
|
||||||
sk->sk_state_change(sk);
|
sk->sk_state_change(sk);
|
||||||
} else {
|
break;
|
||||||
int tmo;
|
}
|
||||||
|
|
||||||
if (tp->linger2 < 0 ||
|
if (tp->linger2 < 0 ||
|
||||||
(TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq &&
|
(TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq &&
|
||||||
@@ -5728,9 +5731,8 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
|||||||
tcp_time_wait(sk, TCP_FIN_WAIT2, tmo);
|
tcp_time_wait(sk, TCP_FIN_WAIT2, tmo);
|
||||||
goto discard;
|
goto discard;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case TCP_CLOSING:
|
case TCP_CLOSING:
|
||||||
if (tp->snd_una == tp->write_seq) {
|
if (tp->snd_una == tp->write_seq) {
|
||||||
|
|||||||
Reference in New Issue
Block a user