Add scripts/coccinelle/deref_null.cocci
authorNicolas Palix <npalix@diku.dk>
Sun, 6 Jun 2010 15:15:07 +0000 (17:15 +0200)
committerMichal Marek <mmarek@suse.cz>
Fri, 11 Jun 2010 22:00:29 +0000 (00:00 +0200)
commit82c4340b0a3ccf090ef38fa111363018cf0594c8
tree909fafb983fbeeedb3ba038ee032f73e3ff181f1
parentf853f8305bc2ab24a2f5fb24c4635c645cc7f9d1
Add scripts/coccinelle/deref_null.cocci

Add a Coccinelle file to identify the dereferences of NULL variables

This semantic patch identifies when a variable is known to be NULL
after a test, but it is still dereferenced later.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/coccinelle/deref_null.cocci [new file with mode: 0644]