changeset 34740:0eb4c719ca0c

Replace malloc+memset by calloc.
author reimar
date Sat, 24 Mar 2012 19:19:48 +0000
parents 8e8688010194
children 6cfaa555bec1
files libmpcodecs/ad_libmad.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);