[asterisk-dev] [asterisk-commits] jpeeler: trunk r146875 - /trunk/main/features.c

Kevin P. Fleming kpfleming at digium.com
Tue Oct 7 07:17:49 CDT 2008


SVN commits to the Asterisk project wrote:
> Author: jpeeler
> Date: Mon Oct  6 17:03:01 2008
> New Revision: 146875
> 
> URL: http://svn.digium.com/view/asterisk?view=rev&rev=146875
> Log:
> Explicitly set args in park_call_exec NULL so in the case of no options being passed in, there
>  is no garbage attempted to be used. Also, do not set args to unknown value again if there are
>  no options passed in.
> 
> 
> Modified:
>     trunk/main/features.c
> 
> Modified: trunk/main/features.c
> URL: http://svn.digium.com/view/asterisk/trunk/main/features.c?view=diff&rev=146875&r1=146874&r2=146875
> ==============================================================================
> --- trunk/main/features.c (original)
> +++ trunk/main/features.c Mon Oct  6 17:03:01 2008
> @@ -2773,22 +2773,30 @@
>  	if (!res) {
>  		struct ast_park_call_args args = {
>  			.orig_chan_name = orig_chan_name,
> +			.extout = NULL,
> +			.return_con = NULL,
> +			.return_ext = NULL,
>  		};

This change should not be necessary (and should have no effect at all).
When a structure initializer is provided, any fields not included in the
initializer are set to zero, by definition in the C standards. Since
NULL is zero on all modern platforms, these fields already were NULL
before this change.

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-dev mailing list