From: Julia Lawall Date: Fri, 26 Dec 2008 07:27:24 +0000 (+0100) Subject: arch/sh/mm: Move a dereference below a NULL test X-Git-Tag: v2.6.29-rc3~35^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bfa122c19e47b1dee47476ce6e9ed6ba16f8269;p=pandora-kernel.git arch/sh/mm: Move a dereference below a NULL test If the NULL test is necessary, then the dereference should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/). // @disable is_null@ identifier f; expression E; identifier fld; statement S; @@ + if (E == NULL) S f(...,E->fld,...); - if (E == NULL) S @@ identifier f; expression E; identifier fld; statement S; @@ + if (!E) S f(...,E->fld,...); - if (!E) S // Signed-off-by: Julia Lawall Signed-off-by: Paul Mundt --- Reading git-diff-tree failed