[MPlayer-cvslog] r32202 - trunk/stream/tvi_def.h

diego subversion at mplayerhq.hu
Sun Sep 12 17:47:37 CEST 2010


Author: diego
Date: Sun Sep 12 17:47:37 2010
New Revision: 32202

Log:
Merge one malloc() + memset() invocation into calloc().

Modified:
   trunk/stream/tvi_def.h

Modified: trunk/stream/tvi_def.h
==============================================================================
--- trunk/stream/tvi_def.h	Sun Sep 12 17:38:21 2010	(r32201)
+++ trunk/stream/tvi_def.h	Sun Sep 12 17:47:37 2010	(r32202)
@@ -51,13 +51,13 @@ static tvi_handle_t *new_handle(void)
 
     if (!h)
 	return NULL;
-    h->priv = malloc(sizeof(priv_t));
+    h->priv = calloc(1, sizeof(priv_t));
     if (!h->priv)
     {
 	free(h);
 	return NULL;
     }
-    memset(h->priv, 0, sizeof(priv_t));
+
     h->functions = &functions;
     h->seq = 0;
     h->chanlist = -1;


More information about the MPlayer-cvslog mailing list