Release coccinelle-0.1.1
[bpt/coccinelle.git] / tests / voyager.cocci
1 // spatch -test voyager -sgrep2
2
3 @ r4 @
4 type T, T2;
5 expression x;
6 expression E1,E2,E;
7 @@
8
9 - x = (T)kmalloc(E1,E2)
10 ... when != x = E
11 - memset((T2)x,0,E1);
12
13 @ r18 @
14 type T, T2;
15 type T1;
16 T1 *x;
17 expression E1,E2;
18 @@
19
20 - x = (T)kmalloc(E1,E2)
21 ...
22 - memset((T2)x,0,sizeof(T1));