]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
tcp: Fix bitmask test in tcp_syn_options()
authorDavid S. Miller <davem@davemloft.net>
Tue, 22 Jul 2008 01:45:34 +0000 (18:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jul 2008 01:45:34 +0000 (18:45 -0700)
commitb32d13102d39ed411d152a7ffcc5f66d5b3b1b49
tree5db024bc2defe8440ea67c16dce65c4082ff4b98
parentebb36a978131810c98e7198b1187090c697cf99f
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>
net/ipv4/tcp_output.c