Skip to content

Commit

Permalink
[TCP]: Fix unlikely usage in tcp_transmit_skb()
Browse files Browse the repository at this point in the history
The following unlikely should be replaced by likely because the
condition happens every time unless there is a hard error to transmit
a packet.

Signed-off-by: Hua Zhong <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
hzhongmj authored and David S. Miller committed Apr 30, 2006
1 parent 8dff7c2 commit 83de47c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
TCP_INC_STATS(TCP_MIB_OUTSEGS);

err = icsk->icsk_af_ops->queue_xmit(skb, 0);
if (unlikely(err <= 0))
if (likely(err <= 0))
return err;

tcp_enter_cwr(sk);
Expand Down

0 comments on commit 83de47c

Please sign in to comment.