tcp: Fix bitmask test in tcp_syn_options()
As reported by Alexey Dobriyan: CHECK net/ipv4/tcp_output.c net/ipv4/tcp_output.c:475:7: warning: dubious: !x & y And sparse is damn right! if (unlikely(!OPTION_TS & opts->options)) ^^^ size += TCPOLEN_SACKPERM_ALIGNED; OPTION_TS is (1 << 1), so condition will never trigger. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ebb36a9781
commit
b32d13102d
@ -472,7 +472,7 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb,
|
||||
}
|
||||
if (likely(sysctl_tcp_sack)) {
|
||||
opts->options |= OPTION_SACK_ADVERTISE;
|
||||
if (unlikely(!OPTION_TS & opts->options))
|
||||
if (unlikely(!(OPTION_TS & opts->options)))
|
||||
size += TCPOLEN_SACKPERM_ALIGNED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user