Add scripts/coccinelle/alloc/kzalloc-simple.cocci
authorNicolas Palix <npalix@diku.dk>
Sun, 6 Jun 2010 15:15:04 +0000 (17:15 +0200)
committerMichal Marek <mmarek@suse.cz>
Fri, 11 Jun 2010 22:00:29 +0000 (00:00 +0200)
commitcf5842de75e9fb8044ff5ca73050e361daa6aae4
treef4f9f8259622be3eb7e90185bbd8d9e4581e27cb
parent51169c801518bf0a250f208362593e7250e7d2c1
Add scripts/coccinelle/alloc/kzalloc-simple.cocci

This semantic patch replaces a pair of calls to kmalloc and memset
by a single call to kzalloc.

It only looks for simple cases to avoid false positives.

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/alloc/kzalloc-simple.cocci [new file with mode: 0644]