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

Friendly Automation (JIRA) noreply at issues.asterisk.org
Mon Dec 18 08:56:07 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240708#comment-240708 ] 

Friendly Automation commented on ASTERISK-24297:
------------------------------------------------

Change 7609 merged by Jenkins2:
cdr: Minor optimizations.

[https://gerrit.asterisk.org/7609|https://gerrit.asterisk.org/7609]

> 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