summaryrefslogtreecommitdiffstats
path: root/contrib/coccinelle/xcalloc.cocci
blob: c291011607ee34618205c13d337d4ce9f040e16d (plain)
1
2
3
4
5
6
7
8
9
10
@@
type T;
T *ptr;
expression n;
@@
  xcalloc(
+ n,
  \( sizeof(T) \| sizeof(*ptr) \)
- , n
  )