changeset 32118:bb29c8d135ed

Merge one malloc() + memset() invocation into calloc().
author diego
date Sun, 12 Sep 2010 15:47:37 +0000
parents 7af5fdfdc3d9
children e2a7509972d4
files stream/tvi_def.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stream/tvi_def.h	Sun Sep 12 15:38:21 2010 +0000
+++ b/stream/tvi_def.h	Sun Sep 12 15:47:37 2010 +0000
@@ -51,13 +51,13 @@
 
     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;