Re: [PATCH 10/14] drivers/ata/libata: Move dereference after NULL test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/17/2009 02:41 AM, Julia Lawall wrote:
From: Julia Lawall<julia@xxxxxxx>

In each case, if the NULL test on qc is needed, then the derefernce
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@xxxxxxx>

applied


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux