[asterisk-dev] [Code Review] dsp.c ast_dsp_call_progress use local short variable in loop, plus other cleanup

Alec Davis reviewboard at asterisk.org
Thu Sep 20 14:46:40 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2107/#review7131
-----------------------------------------------------------


reopened.

thanks richard

- Alec


On Sept. 20, 2012, 6:08 a.m., Alec Davis wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2107/
> -----------------------------------------------------------
> 
> (Updated Sept. 20, 2012, 6:08 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> janitor cleanup. No functional change.
> 
> 1). ast_dsp_call_progress: use 'short samp' instead of s[x] inside loop.
>     apply same casting as other _init, dsp->energy = (int32_t) samp * (int32_t) samp
> 
> 2). ast_dtmf_detect_init: move repeated setting of s->energy to outside of loop.
>     do goertzel_init loop first before setting s->lasthit and s->current_hit, consistant with ast_dsp_digitreset()
> 
> 3). ast_mf_detect_init:
>     do goertzel_init loop first before setting s->hits[] and s->current_hit, consistant with ast_dsp_digitreset()
> 
> 4). Don't chain init different variables, as the type may change
> 
> 
> Diffs
> -----
> 
>   trunk/main/dsp.c 373202 
> 
> Diff: https://reviewboard.asterisk.org/r/2107/diff
> 
> 
> Testing
> -------
> 
> compiles.
> 
> 
> Thanks,
> 
> Alec
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120920/f03b4b41/attachment.htm>


More information about the asterisk-dev mailing list