-
Julia Lawall authored
If the NULL test on buf is needed, then the dereference should be after the NULL test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
60e5c1b5