X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_common.h;h=a87c990ae5a427e3bb329c604304d2ac728c65d9;hb=e304db6b4223cf58800f401e06712690389dd82d;hp=d6607956116c1d17f0048851b70e5f82da8dd700;hpb=3d6ee48d4aacb1fbd5c2741b7b319a62a47009d9;p=vlc diff --git a/include/vlc_common.h b/include/vlc_common.h index d660795611..a87c990ae5 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -3,7 +3,7 @@ * Collection of useful common types and macros definitions ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc_common.h,v 1.94 2003/12/04 16:02:54 sam Exp $ + * $Id: vlc_common.h,v 1.95 2003/12/04 17:15:59 gbazin Exp $ * * Authors: Samuel Hocevar * Vincent Seguin @@ -450,13 +450,14 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ #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 \ { \ - (void *)(tab) = malloc( sizeof( void ** ) ); \ + (*(void **)(&tab)) = malloc( sizeof( void ** ) ); \ } \ - (void**)(tab)[(count)] = (void*)(p); \ + ((void**)(tab))[count] = (void*)(p); \ (count)++ #define TAB_FIND( count, tab, p, index ) \ @@ -465,7 +466,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ (index) = -1; \ for( _i_ = 0; _i_ < (count); _i_++ ) \ { \ - if((void**)(tab)[_i_]==(void*)(p)) \ + if( ((void**)(tab))[_i_] == (void*)(p) ) \ { \ (index) = _i_; \ break; \