# HG changeset patch # User reimar # Date 1332616788 0 # Node ID 0eb4c719ca0cf3d9c57955e8884ae72e51893569 # Parent 8e8688010194feb2db81bfcb6f2641f06c93aedd Replace malloc+memset by calloc. diff -r 8e8688010194 -r 0eb4c719ca0c libmpcodecs/ad_libmad.c --- a/libmpcodecs/ad_libmad.c Sat Mar 24 19:19:03 2012 +0000 +++ b/libmpcodecs/ad_libmad.c Sat Mar 24 19:19:48 2012 +0000 @@ -52,8 +52,7 @@ 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);