[MPlayer-cvslog] r34828 - trunk/libmpcodecs/ad_libmad.c

reimar subversion at mplayerhq.hu
Sat Mar 24 20:19:48 CET 2012


Author: reimar
Date: Sat Mar 24 20:19:48 2012
New Revision: 34828

Log:
Replace malloc+memset by calloc.

Modified:
   trunk/libmpcodecs/ad_libmad.c

Modified: trunk/libmpcodecs/ad_libmad.c
==============================================================================
--- trunk/libmpcodecs/ad_libmad.c	Sat Mar 24 20:19:03 2012	(r34827)
+++ trunk/libmpcodecs/ad_libmad.c	Sat Mar 24 20:19:48 2012	(r34828)
@@ -52,8 +52,7 @@ typedef struct mad_decoder_s {
 
 static int preinit(sh_audio_t *sh){
 
-  mad_decoder_t *this = malloc(sizeof(mad_decoder_t));
-  memset(this,0,sizeof(mad_decoder_t));
+  mad_decoder_t *this = calloc(1, sizeof(mad_decoder_t));
   sh->context = this;
 
   mad_synth_init  (&this->synth);


More information about the MPlayer-cvslog mailing list