![]() If the NULL test is necessary, the initialization involving a dereference of the tested value should be moved after the NULL test. The sematic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; expression E; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
cpmac.c | ||
cpsw.c | ||
cpsw_ale.c | ||
cpsw_ale.h | ||
davinci_cpdma.c | ||
davinci_cpdma.h | ||
davinci_emac.c | ||
davinci_mdio.c | ||
tlan.c | ||
tlan.h |