]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
Remove MALLOC_NULL and use calloc when needed.
[vlc] / include / vlc_common.h
index a637bad3c4f37b8a5a29ddbd5092ba92cf6b569e..7060cb5c4180fa7835f7250797c33954d6d26339 100644 (file)
@@ -603,10 +603,7 @@ static inline uint8_t clip_uint8_vlc( int32_t a )
     else           return a;
 }
 
-/* Malloc with automatic error */
-#define MALLOC_NULL( var, type ) do { var = (type*)malloc( sizeof( type) ); \
-                                   if( !var ) return NULL; } while(0)
-
+/* Free and set set the variable to NULL */
 #define FREENULL(a) do { free( a ); a = NULL; } while(0)
 
 #define EMPTY_STR(str) (!str || !*str)