]> git.sesse.net Git - vlc/commitdiff
* vlc_common: changed TAB_APPEND. I have to do this because the old way
authorLaurent Aimar <fenrir@videolan.org>
Sat, 24 Jan 2004 20:40:46 +0000 (20:40 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 24 Jan 2004 20:40:46 +0000 (20:40 +0000)
 seems to make bogus code (but I'm not sure).

include/vlc_common.h

index f698cad2a9e948f2e03bc21c49e5a3816a5a6fcf..d931212bd2143b335e50fbe4ea3631cc509ff1ad 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.103 2004/01/20 17:44:30 sam Exp $
+ * $Id: vlc_common.h,v 1.104 2004/01/24 20:40:46 fenrir Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -453,12 +453,11 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 #define TAB_APPEND( count, tab, p )             \
     if( (count) > 0 )                           \
     {                                           \
 #define TAB_APPEND( count, tab, p )             \
     if( (count) > 0 )                           \
     {                                           \
-        (*(void **)(&tab)) =                    \
-            realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
+        (void *)(tab) = realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
     }                                           \
     else                                        \
     {                                           \
     }                                           \
     else                                        \
     {                                           \
-        (*(void **)(&tab)) = malloc( sizeof( void ** ) );    \
+        (void *)(tab) = malloc( sizeof( void ** ) );    \
     }                                           \
     ((void**)(tab))[count] = (void*)(p);        \
     (count)++
     }                                           \
     ((void**)(tab))[count] = (void*)(p);        \
     (count)++