Release coccinelle-0.2.2-rc1
[bpt/coccinelle.git] / tests / cst_null.cocci
1 // test x != NULL <=> NULL != x iso, and x != NULL => x iso
2
3 @r@
4 expression x;
5 expression E1,E2;
6 statement S2;
7 @@
8
9 - x = kmalloc(E1,E2)
10 + x = kzalloc(E1,E2)
11 ...
12 if (x!=NULL) {
13 ...
14 - memset(x,0,E1);
15 ...
16 } else S2