repo.or.cz
/
systemd_ALT.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
1:255.13-alt1
[systemd_ALT.git]
/
coccinelle
/
memzero.cocci
blob
90fa0ddef65583817d4f574b5ae78414f1a4bca5
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2
@@
3
expression s;
4
@@
5
- memset(&s, 0, sizeof(s))
6
+ zero(s)
7
@@
8
expression s;
9
@@
10
- memset(s, 0, sizeof(*s))
11
+ zero(*s)
12
@@
13
expression s;
14
@@
15
- bzero(&s, sizeof(s))
16
+ zero(s)
17
@@
18
expression s;
19
@@
20
- bzero(s, sizeof(*s))
21
+ zero(*s)
22
@@
23
expression a, b;
24
@@
25
(
26
#define memzero
27
&
28
- memset(a, 0, b)
29
+ memzero(a, b)
30
)
31
@@
32
expression a, b;
33
@@
34
(
35
#define memzero
36
&
37
- bzero(a, b)
38
+ memzero(a, b)
39
)