git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e65cc19
)
drivers/ata/libata: Move dereference after NULL test
author
Julia Lawall
<julia@diku.dk>
Sat, 17 Oct 2009 06:41:47 +0000
(08:41 +0200)
committer
Jeff Garzik
<jgarzik@redhat.com>
Tue, 3 Nov 2009 19:26:12 +0000
(14:26 -0500)
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@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c
patch
|
blob
|
history
diff --cc
drivers/ata/libata-core.c
Simple merge