diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-21 21:45:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-21 21:45:34 -0400 |
commit | b32d13102d39ed411d152a7ffcc5f66d5b3b1b49 (patch) | |
tree | 5db024bc2defe8440ea67c16dce65c4082ff4b98 /net | |
parent | ebb36a978131810c98e7198b1187090c697cf99f (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 1fa683c0ba9b..a00532de2a8c 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -472,7 +472,7 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb, | |||
472 | } | 472 | } |
473 | if (likely(sysctl_tcp_sack)) { | 473 | if (likely(sysctl_tcp_sack)) { |
474 | opts->options |= OPTION_SACK_ADVERTISE; | 474 | opts->options |= OPTION_SACK_ADVERTISE; |
475 | if (unlikely(!OPTION_TS & opts->options)) | 475 | if (unlikely(!(OPTION_TS & opts->options))) |
476 | size += TCPOLEN_SACKPERM_ALIGNED; | 476 | size += TCPOLEN_SACKPERM_ALIGNED; |
477 | } | 477 | } |
478 | 478 | ||