summaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorJulia Lawall2009-07-27 08:15:43 +0200
committerDavid S. Miller2009-07-27 20:35:29 +0200
commit479432344420bc9a868088e346fecb6765e2b674 (patch)
tree08d57c28a83ba2c633c91df8490e37f6d4adc03f /include/linux/ethtool.h
parentdrivers/net: Correct redundant test (diff)
downloadkernel-qcow2-linux-479432344420bc9a868088e346fecb6765e2b674.tar.gz
kernel-qcow2-linux-479432344420bc9a868088e346fecb6765e2b674.tar.xz
kernel-qcow2-linux-479432344420bc9a868088e346fecb6765e2b674.zip
net/netlabel: Correct redundant test
entry was tested for NULL near the beginning of the function, followed by a return, and there is no intervening modification of its value. A simplified version of the semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x == NULL || ...) { ... when forall return ...; } ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\) ( *x == NULL | *x != NULL ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ethtool.h')
0 files changed, 0 insertions, 0 deletions