]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/memzero.cocci
test: also flush and rotate journal before read
[thirdparty/systemd.git] / coccinelle / memzero.cocci
CommitLineData
64b92d63 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
67319249
LP
2@@
3expression s;
4@@
5- memset(&s, 0, sizeof(s))
6+ zero(s)
7@@
8expression s;
9@@
10- memset(s, 0, sizeof(*s))
11+ zero(*s)
12@@
13expression s;
14@@
15- bzero(&s, sizeof(s))
16+ zero(s)
17@@
18expression s;
19@@
20- bzero(s, sizeof(*s))
21+ zero(*s)
22@@
23expression a, b;
24@@
33af88cf
FS
25(
26#define memzero
27&
67319249
LP
28- memset(a, 0, b)
29+ memzero(a, b)
33af88cf 30)
67319249
LP
31@@
32expression a, b;
33@@
33af88cf
FS
34(
35#define memzero
36&
67319249
LP
37- bzero(a, b)
38+ memzero(a, b)
33af88cf 39)