[MPlayer-dev-eng] [PATCH 1/4] demux_avs: calloc instead of malloc + memset
Gianluigi Tiesi
mplayer at netfarm.it
Mon Nov 4 07:52:04 CET 2013
---
libmpdemux/demux_avs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libmpdemux/demux_avs.c b/libmpdemux/demux_avs.c
index 0aa5ba7..da5c3a1 100644
--- a/libmpdemux/demux_avs.c
+++ b/libmpdemux/demux_avs.c
@@ -84,12 +84,10 @@ typedef struct tagAVS
static AVS_T *initAVS(const char *filename)
{
- AVS_T *AVS = malloc (sizeof(AVS_T));
+ AVS_T *AVS = calloc(1, sizeof(AVS_T));
AVS_Value arg0 = avs_new_value_string(filename);
AVS_Value args = avs_new_value_array(&arg0, 1);
- memset(AVS, 0, sizeof(AVS_T));
-
#ifdef WIN32_LOADER
AVS->ldt_fs = Setup_LDT_Keeper();
#endif
--
1.8.4.2
--
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
More information about the MPlayer-dev-eng
mailing list