1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
systemd/coccinelle/reallocarray.cocci

22 lines
373 B
Plaintext
Raw Normal View History

/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression q, p, n, m;
@@
- q = realloc(p, (n)*(m))
+ q = reallocarray(p, n, m)
@@
expression q, p, n, m;
@@
- q = realloc(p, n*(m))
+ q = reallocarray(p, n, m)
@@
expression q, p, n, m;
@@
- q = realloc(p, (n)*m)
+ q = reallocarray(p, n, m)
@@
expression q, p, n, m;
@@
- q = realloc(p, n*m)
+ q = reallocarray(p, n, m)