[svn-commits] trunk r35788 - /trunk/udptl.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Jun 23 21:03:52 MST 2006


Author: russell
Date: Fri Jun 23 23:03:52 2006
New Revision: 35788

URL: http://svn.digium.com/view/asterisk?rev=35788&view=rev
Log:
ast_calloc, instead of malloc and memset

Modified:
    trunk/udptl.c

Modified: trunk/udptl.c
URL: http://svn.digium.com/view/asterisk/trunk/udptl.c?rev=35788&r1=35787&r2=35788&view=diff
==============================================================================
--- trunk/udptl.c (original)
+++ trunk/udptl.c Fri Jun 23 23:03:52 2006
@@ -772,9 +772,8 @@
 	int i;
 	long int flags;
 
-	if ((udptl = malloc(sizeof(struct ast_udptl))) == NULL)
+	if (!(udptl = ast_calloc(1, sizeof(*udptl))))
 		return NULL;
-	memset(udptl, 0, sizeof(struct ast_udptl));
 
 	if (udptlfectype == 2)
 		udptl->error_correction_scheme = UDPTL_ERROR_CORRECTION_FEC;



More information about the svn-commits mailing list