From: Julia Lawall Date: Mon, 27 Jul 2009 06:15:43 +0000 (+0000) Subject: net/netlabel: Correct redundant test X-Git-Tag: v2.6.32-rc1~703^2~519 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=479432344420bc9a868088e346fecb6765e2b674;p=pandora-kernel.git 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/) // @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 ) // Signed-off-by: Julia Lawall Acked-by: Paul Moore Signed-off-by: David S. Miller --- Reading git-diff-tree failed