Commit 3432e956 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

vlc_arrays.h: Don't use calloc, seems unreliable.

parent fdde8d99
......@@ -290,11 +290,6 @@ typedef struct vlc_array_t
void ** pp_elems;
} vlc_array_t;
static inline vlc_array_t * vlc_array_new( void )
{
return (vlc_array_t *)calloc( 1, sizeof(vlc_array_t) );
}
static inline void vlc_array_init( vlc_array_t * p_array )
{
memset( p_array, 0, sizeof(vlc_array_t) );
......@@ -306,6 +301,13 @@ static inline void vlc_array_clear( vlc_array_t * p_array )
memset( p_array, 0, sizeof(vlc_array_t) );
}
static inline vlc_array_t * vlc_array_new( void )
{
vlc_array_t * ret = malloc( sizeof(vlc_array_t) );
vlc_array_init( ret );
return ret;
}
static inline void vlc_array_destroy( vlc_array_t * p_array )
{
vlc_array_clear( p_array );
......
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