Julia Lawall 4794323444 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>
2009-07-27 11:35:29 -07:00
..
2009-05-25 01:53:53 -07:00
2009-01-04 17:29:21 -08:00
2009-05-25 01:53:53 -07:00
2009-07-12 14:03:27 -07:00
2009-07-23 18:01:10 -07:00
2009-07-27 08:03:18 -07:00
2009-07-12 14:03:27 -07:00