[Home]

Summary:ASTERISK-06048: [patch] Converting /apps to use *alloc() wrappers - 1
Reporter:Matthew Roth (matthew roth)Labels:
Date Opened:2006-01-11 10:13:49.000-0600Date Closed:2008-01-15 16:14:20.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_adsiprog-alloc_wrappers-1.0.patch
Description:This patch updates apps/app_adsiprog.c to use the new *alloc() wrappers.

In the compile_script() function malloc() + memset() was used on a struct.  The patch replaces it with ast_calloc() and removes the related error message.

****** ADDITIONAL INFORMATION ******

There are many more patches like this to come.  In the future, I'll bundle changes to multiple files in a single patch.  Consider this a dry run to catch any stupid mistakes I may have made before I start hitting bigger groups of files.
Comments:By: Russell Bryant (russell) 2006-01-11 11:37:11.000-0600

added to the trunk with some minor modifications to use sizeof(*scr) instead of sizeof(struct adsi_prog) and putting the allocation and check for NULL all in one line while I was editing it anyway

thanks!

By: Digium Subversion (svnbot) 2008-01-15 16:14:20.000-0600

Repository: asterisk
Revision: 7985

U   trunk/apps/app_adsiprog.c

------------------------------------------------------------------------
r7985 | russell | 2008-01-15 16:14:20 -0600 (Tue, 15 Jan 2008) | 3 lines

replace malloc+memset with a call to ast_calloc, also removing the error
message that is no longer necessary (issue ASTERISK-6048)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=7985