]> git.sesse.net Git - vlc/blobdiff - src/control/media_list_path.h
fix compile
[vlc] / src / control / media_list_path.h
index 253edd6bd74d18ee7a5ddda19cbeaa7a92683bb0..1cca9f2fdf4e79190faaed64ae0fb7926d61570d 100644 (file)
@@ -49,7 +49,7 @@ static inline void libvlc_media_list_path_dump( const libvlc_media_list_path_t p
  **************************************************************************/
 static inline libvlc_media_list_path_t libvlc_media_list_path_empty( void )
 {
-    libvlc_media_list_path_t ret = malloc(sizeof(int));
+    libvlc_media_list_path_t ret = xmalloc(sizeof(int));
     ret[0] = -1;
     return ret;
 }
@@ -59,7 +59,7 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_empty( void )
  **************************************************************************/
 static inline libvlc_media_list_path_t libvlc_media_list_path_with_root_index( int index )
 {
-    libvlc_media_list_path_t ret = malloc(sizeof(int)*2);
+    libvlc_media_list_path_t ret = xmalloc(sizeof(int)*2);
     ret[0] = index;
     ret[1] = -1;
     return ret;
@@ -81,7 +81,7 @@ static inline int libvlc_media_list_path_depth( const libvlc_media_list_path_t p
 static inline void libvlc_media_list_path_append( libvlc_media_list_path_t * p_path, int index )
 {
     int old_depth = libvlc_media_list_path_depth( *p_path );
-    *p_path = realloc( *p_path, sizeof(int)*(old_depth+2));
+    *p_path = xrealloc( *p_path, sizeof(int)*(old_depth+2));
     *p_path[old_depth] = index;
     *p_path[old_depth+1] = -1;
 }
@@ -93,7 +93,7 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_copy_by_appending(
 {
     libvlc_media_list_path_t ret;
     int old_depth = libvlc_media_list_path_depth( path );
-    ret = malloc( sizeof(int) * (old_depth + 2) );
+    ret = xmalloc( sizeof(int) * (old_depth + 2) );
     memcpy( ret, path, sizeof(int) * old_depth );
     ret[old_depth] = index;
     ret[old_depth+1] = -1;
@@ -107,7 +107,7 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_copy( const libvlc
 {
     libvlc_media_list_path_t ret;
     int depth = libvlc_media_list_path_depth( path );
-    ret = malloc( sizeof(int)*(depth+1) );
+    ret = xmalloc( sizeof(int)*(depth+1) );
     memcpy( ret, path, sizeof(int)*(depth+1) );
     return ret;
 }
@@ -119,7 +119,7 @@ static libvlc_media_list_path_t
 get_path_rec( const libvlc_media_list_path_t path, libvlc_media_list_t * p_current_mlist, libvlc_media_t * p_searched_md )
 {
     int i, count;
-    count = libvlc_media_list_count( p_current_mlist, NULL );
+    count = libvlc_media_list_count( p_current_mlist );
     for( i = 0; i < count; i++ )
     {
         libvlc_media_t * p_md = libvlc_media_list_item_at_index( p_current_mlist, i, NULL );