Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+133 −136
Original line number Diff line number Diff line
@@ -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 request_sock *req;
	int queued = 0;
	bool acceptable;

	tp->rx_opt.saw_tstamp = 0;

@@ -5606,8 +5607,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
		return 0;

	/* step 5: check the ACK field */
	if (true) {
		int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH |
	acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH |
				      FLAG_UPDATE_TS_RECENT) > 0;

	switch (sk->sk_state) {
@@ -5642,8 +5642,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
			 * NULL and sk->sk_socket == NULL.
			 */
			if (sk->sk_socket)
					sk_wake_async(sk,
						      SOCK_WAKE_IO, POLL_OUT);
				sk_wake_async(sk, SOCK_WAKE_IO, POLL_OUT);

			tp->snd_una = TCP_SKB_CB(skb)->ack_seq;
			tp->snd_wnd = ntohs(th->window) <<
@@ -5659,10 +5658,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
				 * to the regular data transmission case
				 * when new data has just been ack'ed.
				 *
					 * (TFO) - we could try to be more
					 * aggressive and retranmitting any data
					 * sooner based on when they were sent
					 * out.
				 * (TFO) - we could try to be more aggressive
				 * and retransmitting any data sooner based
				 * on when they are sent out.
				 */
				tcp_rearm_rto(sk);
			} else
@@ -5709,10 +5707,10 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
			if (dst)
				dst_confirm(dst);

				if (!sock_flag(sk, SOCK_DEAD))
			if (!sock_flag(sk, SOCK_DEAD)) {
				/* Wake up lingering close() */
				sk->sk_state_change(sk);
				else {
			} else {
				int tmo;

				if (tp->linger2 < 0 ||
@@ -5757,7 +5755,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
		}
		break;
	}
	}

	/* step 6: check the URG bit */
	tcp_urg(sk, skb, th);