changeset 32099:0e249bbc445c

Replace malloc+memset by calloc.
author reimar
date Sun, 12 Sep 2010 12:14:37 +0000
parents 522a5ab34d2f
children 0e09b34b0c47
files libmpdemux/demux_vqf.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_vqf.c	Sun Sep 12 12:12:24 2010 +0000
+++ b/libmpdemux/demux_vqf.c	Sun Sep 12 12:14:37 2010 +0000
@@ -49,9 +49,8 @@
   s = demuxer->stream;
 
   sh_audio = new_sh_audio(demuxer,0, NULL);
-  sh_audio->wf = w = malloc(sizeof(WAVEFORMATEX)+sizeof(headerInfo));
+  sh_audio->wf = w = calloc(1, sizeof(WAVEFORMATEX)+sizeof(headerInfo));
   hi = (headerInfo *)&w[1];
-  memset(hi,0,sizeof(headerInfo));
   w->wFormatTag = 0x1;
   sh_audio->format = mmioFOURCC('T','W','I','N'); /* TWinVQ */
   w->nChannels = sh_audio->channels = 2;