diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index bdc80734cd2c..7404e5238e00 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -641,7 +641,7 @@ static unsigned int tcp_synack_options(struct sock *sk, | |||
641 | if (unlikely(!ireq->tstamp_ok)) | 641 | if (unlikely(!ireq->tstamp_ok)) |
642 | remaining -= TCPOLEN_SACKPERM_ALIGNED; | 642 | remaining -= TCPOLEN_SACKPERM_ALIGNED; |
643 | } | 643 | } |
644 | if (foc != NULL && foc->len >= 0) { | 644 | if (foc && foc->len >= 0) { |
645 | u32 need = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; | 645 | u32 need = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; |
646 | need = (need + 3) & ~3U; /* Align to 32 bits */ | 646 | need = (need + 3) & ~3U; /* Align to 32 bits */ |
647 | if (remaining >= need) { | 647 | if (remaining >= need) { |
@@ -2224,7 +2224,7 @@ void tcp_send_loss_probe(struct sock *sk) | |||
2224 | int mss = tcp_current_mss(sk); | 2224 | int mss = tcp_current_mss(sk); |
2225 | int err = -1; | 2225 | int err = -1; |
2226 | 2226 | ||
2227 | if (tcp_send_head(sk) != NULL) { | 2227 | if (tcp_send_head(sk)) { |
2228 | err = tcp_write_xmit(sk, mss, TCP_NAGLE_OFF, 2, GFP_ATOMIC); | 2228 | err = tcp_write_xmit(sk, mss, TCP_NAGLE_OFF, 2, GFP_ATOMIC); |
2229 | goto rearm_timer; | 2229 | goto rearm_timer; |
2230 | } | 2230 | } |
@@ -2758,7 +2758,7 @@ begin_fwd: | |||
2758 | if (!tcp_can_forward_retransmit(sk)) | 2758 | if (!tcp_can_forward_retransmit(sk)) |
2759 | break; | 2759 | break; |
2760 | /* Backtrack if necessary to non-L'ed skb */ | 2760 | /* Backtrack if necessary to non-L'ed skb */ |
2761 | if (hole != NULL) { | 2761 | if (hole) { |
2762 | skb = hole; | 2762 | skb = hole; |
2763 | hole = NULL; | 2763 | hole = NULL; |
2764 | } | 2764 | } |
@@ -2811,7 +2811,7 @@ void tcp_send_fin(struct sock *sk) | |||
2811 | */ | 2811 | */ |
2812 | mss_now = tcp_current_mss(sk); | 2812 | mss_now = tcp_current_mss(sk); |
2813 | 2813 | ||
2814 | if (tcp_send_head(sk) != NULL) { | 2814 | if (tcp_send_head(sk)) { |
2815 | TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_FIN; | 2815 | TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_FIN; |
2816 | TCP_SKB_CB(skb)->end_seq++; | 2816 | TCP_SKB_CB(skb)->end_seq++; |
2817 | tp->write_seq++; | 2817 | tp->write_seq++; |
@@ -3015,7 +3015,7 @@ static void tcp_connect_init(struct sock *sk) | |||
3015 | (sysctl_tcp_timestamps ? TCPOLEN_TSTAMP_ALIGNED : 0); | 3015 | (sysctl_tcp_timestamps ? TCPOLEN_TSTAMP_ALIGNED : 0); |
3016 | 3016 | ||
3017 | #ifdef CONFIG_TCP_MD5SIG | 3017 | #ifdef CONFIG_TCP_MD5SIG |
3018 | if (tp->af_specific->md5_lookup(sk, sk) != NULL) | 3018 | if (tp->af_specific->md5_lookup(sk, sk)) |
3019 | tp->tcp_header_len += TCPOLEN_MD5SIG_ALIGNED; | 3019 | tp->tcp_header_len += TCPOLEN_MD5SIG_ALIGNED; |
3020 | #endif | 3020 | #endif |
3021 | 3021 | ||
@@ -3376,8 +3376,8 @@ int tcp_write_wakeup(struct sock *sk) | |||
3376 | if (sk->sk_state == TCP_CLOSE) | 3376 | if (sk->sk_state == TCP_CLOSE) |
3377 | return -1; | 3377 | return -1; |
3378 | 3378 | ||
3379 | if ((skb = tcp_send_head(sk)) != NULL && | 3379 | skb = tcp_send_head(sk); |
3380 | before(TCP_SKB_CB(skb)->seq, tcp_wnd_end(tp))) { | 3380 | if (skb && before(TCP_SKB_CB(skb)->seq, tcp_wnd_end(tp))) { |
3381 | int err; | 3381 | int err; |
3382 | unsigned int mss = tcp_current_mss(sk); | 3382 | unsigned int mss = tcp_current_mss(sk); |
3383 | unsigned int seg_size = tcp_wnd_end(tp) - TCP_SKB_CB(skb)->seq; | 3383 | unsigned int seg_size = tcp_wnd_end(tp) - TCP_SKB_CB(skb)->seq; |