Commit 7402eee9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Add xcalloc(). Do not use this in new code!

(cherry picked from commit c1f0e3ce2323f66c99f34065fad62de2c3cbe8d8)
parent 99fbdecc
......@@ -889,6 +889,14 @@ static inline void *xrealloc (void *ptr, size_t len)
return nptr;
}
static inline void *xcalloc (size_t n, size_t size)
{
void *ptr = calloc (n, size);
if (unlikely (ptr == NULL))
abort ();
return ptr;
}
/*****************************************************************************
* libvlc features
*****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment