summaryrefslogtreecommitdiff
path: root/coccinelle/memzero.cocci
blob: 8198cc84b4cd4ad854f72ef25c0b82c2a6ced964 (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
31
32
33
34
35
36
37
38
@@
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;
@@
(
#define memzero
&
- memset(a, 0, b)
+ memzero(a, b)
)
@@
expression a, b;
@@
(
#define memzero
&
- bzero(a, b)
+ memzero(a, b)
)