linux/drivers/message
Julia Lawall c31558efcc [SCSI] fusion: 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/).

// <smpl>
@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
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: "Prakash, Sathya" <Sathya.Prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-01-02 12:11:15 -06:00
..
fusion [SCSI] fusion: Move a dereference below a NULL test 2009-01-02 12:11:15 -06:00
i2o drivers/message/i2o/iop.c: cleanup kerneldoc 2008-12-05 13:40:52 -08:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00