1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
systemd/coccinelle/memzero.cocci

39 lines
376 B
Plaintext
Raw Normal View History

@@
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)
)