git/contrib/coccinelle/xcalloc.cocci

11 строки
96 B
Plaintext

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