systemd/coccinelle/malloc_multiply.cocci

21 lines
296 B
Plaintext

@@
expression q, n, m;
@@
- q = malloc((n)*(m))
+ q = malloc_multiply(n, m)
@@
expression q, n, m;
@@
- q = malloc(n*(m))
+ q = malloc_multiply(n, m)
@@
expression q, n, m;
@@
- q = malloc((n)*m)
+ q = malloc_multiply(n, m)
@@
expression q, n, m;
@@
- q = malloc(n*m)
+ q = malloc_multiply(n, m)