summaryrefslogtreecommitdiffstats
path: root/coccinelle/memzero.cocci
blob: ebdc3f6a2a9493440fc66cc080a80a74ecaa7439 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@@
expression s;
@@
- memset(&s, 0, sizeof(s))
+ zero(s)
@@
expression s;
@@
- memset(s, 0, sizeof(*s))
+ zero(*s)
@@
expression s;
@@
- bzero(&s, sizeof(s))
+ zero(s)
@@
expression s;
@@
- bzero(s, sizeof(*s))
+ zero(*s)
@@
expression a, b;
@@
- memset(a, 0, b)
+ memzero(a, b)
@@
expression a, b;
@@
- bzero(a, b)
+ memzero(a, b)