Commit 1f6afc81 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: remove one indentation level in tcp_rcv_state_process()

Remove one level of indentation 'introduced' in commit
c3ae62af (tcp: should drop incoming frames without ACK flag set)

if (true) {
        ...
}

@acceptable variable is a boolean.

This patch is a pure cleanup.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 42e52bf9
...@@ -5536,6 +5536,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -5536,6 +5536,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
struct inet_connection_sock *icsk = inet_csk(sk); struct inet_connection_sock *icsk = inet_csk(sk);
struct request_sock *req; struct request_sock *req;
int queued = 0; int queued = 0;
bool acceptable;
tp->rx_opt.saw_tstamp = 0; tp->rx_opt.saw_tstamp = 0;
...@@ -5606,8 +5607,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -5606,8 +5607,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
return 0; return 0;
/* step 5: check the ACK field */ /* step 5: check the ACK field */
if (true) { acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH |
int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH |
FLAG_UPDATE_TS_RECENT) > 0; FLAG_UPDATE_TS_RECENT) > 0;
switch (sk->sk_state) { switch (sk->sk_state) {
...@@ -5642,8 +5642,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -5642,8 +5642,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
* NULL and sk->sk_socket == NULL. * NULL and sk->sk_socket == NULL.
*/ */
if (sk->sk_socket) if (sk->sk_socket)
sk_wake_async(sk, sk_wake_async(sk, SOCK_WAKE_IO, POLL_OUT);
SOCK_WAKE_IO, POLL_OUT);
tp->snd_una = TCP_SKB_CB(skb)->ack_seq; tp->snd_una = TCP_SKB_CB(skb)->ack_seq;
tp->snd_wnd = ntohs(th->window) << tp->snd_wnd = ntohs(th->window) <<
...@@ -5659,10 +5658,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -5659,10 +5658,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
* to the regular data transmission case * to the regular data transmission case
* when new data has just been ack'ed. * when new data has just been ack'ed.
* *
* (TFO) - we could try to be more * (TFO) - we could try to be more aggressive
* aggressive and retranmitting any data * and retransmitting any data sooner based
* sooner based on when they were sent * on when they are sent out.
* out.
*/ */
tcp_rearm_rto(sk); tcp_rearm_rto(sk);
} else } else
...@@ -5709,10 +5707,10 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -5709,10 +5707,10 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
if (dst) if (dst)
dst_confirm(dst); dst_confirm(dst);
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 { } else {
int tmo; int tmo;
if (tp->linger2 < 0 || if (tp->linger2 < 0 ||
...@@ -5757,7 +5755,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -5757,7 +5755,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
} }
break; break;
} }
}
/* step 6: check the URG bit */ /* step 6: check the URG bit */
tcp_urg(sk, skb, th); tcp_urg(sk, skb, th);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment