[MPlayer-cvslog] r30744 - in trunk: TOOLS/bmovl-test.c TOOLS/vfw2menc.c asxparser.c gui/win32/dialogs.c gui/win32/widgetrender.c libao2/ao_coreaudio.c libmenu/menu_filesel.c libmpcodecs/ad_libmad.c libmpcodecs/ae.c...

Diego Biurrun diego at biurrun.de
Fri Feb 26 22:48:00 CET 2010


On Fri, Feb 26, 2010 at 04:01:37PM +0100, diego wrote:
> 
> Log:
> Do not cast the results of malloc/calloc/realloc.
> These functions return void*, which is compatible with any pointer,
> so there is no need for casts.
> 
> --- trunk/libmpdemux/demuxer.h	Fri Feb 26 13:49:49 2010	(r30743)
> +++ trunk/libmpdemux/demuxer.h	Fri Feb 26 16:01:37 2010	(r30744)
> @@ -261,7 +261,7 @@ typedef struct {
>  } demux_program_t;
>  
>  static inline demux_packet_t* new_demux_packet(int len){
> -  demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t));
> +  demux_packet_t* dp = malloc(sizeof(demux_packet_t));
>    dp->len=len;

Crap, this gets included from the C++ live555 glue code and breaks there.
Is there an alternative to just reverting this?

Diego


More information about the MPlayer-cvslog mailing list