1
0
mirror of https://github.com/systemd/systemd synced 2024-07-09 12:36:12 +00: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)