git/contrib/coccinelle/xcalloc.cocci

11 lines
96 B
Plaintext

@@
type T;
T *ptr;
expression n;
@@
xcalloc(
+ n,
\( sizeof(T) \| sizeof(*ptr) \)
- , n
)