]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
Interaction cleanup, remove some unused functions, factorize some code, ...
[vlc] / include / vlc_common.h
index 9615be9a4fc612dfaf0415af484d6f7409de3444..2f3e156d2acc8c753c9feecdc3542529fd43b107 100644 (file)
@@ -618,10 +618,13 @@ static int64_t GCD( int64_t a, int64_t b )
                                       if( !var ) goto error; }
 #define DECMALLOC_VOID( var, type ) type* var = (type*)malloc( sizeof(type) );\
                                     if( !var ) return;
+#define DECMALLOC_ERR( var, type ) type* var = (type*)malloc( sizeof(type) );\
+                                    if( !var ) return VLC_ENOMEM;
 #define DECMALLOC_NULL( var, type ) type* var = (type*)malloc( sizeof(type) );\
                                     if( !var ) return NULL;
 
 #define FREENULL(a) if( a ) { free( a ); a = NULL; }
+#define FREE(a) if( a ) { free( a ); }
 
 /* Dynamic array handling: realloc array, move data, increment position */
 #if defined( _MSC_VER ) && _MSC_VER < 1300 && !defined( UNDER_CE )