summaryrefslogtreecommitdiffstats
path: root/Documentation/serial-console.txt
diff options
context:
space:
mode:
authorXi Wang2012-11-11 12:20:01 +0100
committerDavid S. Miller2012-11-11 23:53:13 +0100
commit0c9f79be295c99ac7e4b569ca493d75fdcc19e4e (patch)
tree86ac3ac72907079585afc43ec2a25edcb8bb051b /Documentation/serial-console.txt
parentLinux 3.7-rc5 (diff)
downloadkernel-qcow2-linux-0c9f79be295c99ac7e4b569ca493d75fdcc19e4e.tar.gz
kernel-qcow2-linux-0c9f79be295c99ac7e4b569ca493d75fdcc19e4e.tar.xz
kernel-qcow2-linux-0c9f79be295c99ac7e4b569ca493d75fdcc19e4e.zip
ipv4: avoid undefined behavior in do_ip_setsockopt()
(1<<optname) is undefined behavior in C with a negative optname or optname larger than 31. In those cases the result of the shift is not necessarily zero (e.g., on x86). This patch simplifies the code with a switch statement on optname. It also allows the compiler to generate better code (e.g., using a 64-bit mask). Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/serial-console.txt')
0 files changed, 0 insertions, 0 deletions