[asterisk-bugs] [JIRA] (ASTERISK-24297) cdr.c: Minor code optimizations.

Matt Jordan (JIRA) noreply at issues.asterisk.org
Thu Sep 4 09:56:28 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-24297:
-----------------------------------

    Affects Version/s: 12.5.0
                       13.0.0-beta1

> cdr.c: Minor code optimizations.
> --------------------------------
>
>                 Key: ASTERISK-24297
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24297
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: CDR/General
>    Affects Versions: 12.5.0, 13.0.0-beta1
>            Reporter: Richard Mudgett
>
> From https://reviewboard.asterisk.org/r/3964/ I made a couple code optimization suggestions.
> In bridge_candidate_process():
> * Nothing cares about the return value.
> * The RAII_VAR and SCOPED_AO2LOCK can easily be eliminated by changing the "return 0" statements in the for loop to breaks.
> In handle_standard_bridge_enter_message():
> * There is a tail recursion that could be eliminated by pulling the main for loop in the function into its own routine.  Then the cdr lock also won't be recursively obtained.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list