[Asterisk-code-review] Remove constant conditionals (dead-code). (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Mon Dec 18 16:16:38 CST 2017
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7629 )
Change subject: Remove constant conditionals (dead-code).
......................................................................
Patch Set 1: Code-Review-1
(6 comments)
Some additional things beyond what the compiler complains about in the localtime.c file.
https://gerrit.asterisk.org/#/c/7629/1/main/stdtime/localtime.c
File main/stdtime/localtime.c:
https://gerrit.asterisk.org/#/c/7629/1/main/stdtime/localtime.c@1549
PS1, Line 1549: ** If summer time is in effect, and the
: ** transition time was not specified as
: ** standard time, add the summer time
: ** offset to the transition time;
: ** otherwise, add the standard time
: ** offset to the transition time.
This comment needs updating too.
https://gerrit.asterisk.org/#/c/7629/1/res/res_config_ldap.c
File res/res_config_ldap.c:
https://gerrit.asterisk.org/#/c/7629/1/res/res_config_ldap.c@312
PS1, Line 312: int i = 0;
i is not used anymore
https://gerrit.asterisk.org/#/c/7629/1/res/res_config_ldap.c@315
PS1, Line 315: int pos = 0;
pos is a constant now and only used in a couple places after the removed code.
With the additional changes below pos is no longer needed either.
https://gerrit.asterisk.org/#/c/7629/1/res/res_config_ldap.c@340
PS1, Line 340: /* for the last delimited value or if the value is not delimited: */
This comment now needs updating.
https://gerrit.asterisk.org/#/c/7629/1/res/res_config_ldap.c@342
PS1, Line 342: prev->next = ast_variable_new(attribute_name, &valptr[pos], table_config->table_name);
s/&valptr[pos]/valptr/
https://gerrit.asterisk.org/#/c/7629/1/res/res_config_ldap.c@347
PS1, Line 347: prev = var = ast_variable_new(attribute_name, &valptr[pos], table_config->table_name);
s/&valptr[pos]/valptr/
--
To view, visit https://gerrit.asterisk.org/7629
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I62e2aac353d739fb3c983cf768933120f5fba059
Gerrit-Change-Number: 7629
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Mon, 18 Dec 2017 22:16:38 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171218/80eef912/attachment.html>
More information about the asterisk-code-review
mailing list