mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Remove constant conditionals (dead-code).
Some variables are set and never changed, making them constant. This means that code in the 'false' block of the conditional is unreachable. In chan_skinny and res_config_ldap I used preprocessor directive `#if 0` as I'm unsure if the unreachable code could be enabled in the future. Change-Id: I62e2aac353d739fb3c983cf768933120f5fba059
This commit is contained in:
@@ -1411,7 +1411,7 @@ static int xmldoc_parse_example(struct ast_xml_node *fixnode, struct ast_str **b
|
||||
static int xmldoc_parse_specialtags(struct ast_xml_node *fixnode, const char *tabs, const char *posttabs, struct ast_str **buffer)
|
||||
{
|
||||
struct ast_xml_node *node = fixnode;
|
||||
int ret = 0, i, count = 0;
|
||||
int ret = 0, i;
|
||||
|
||||
if (!node || !ast_xml_node_get_children(node)) {
|
||||
return ret;
|
||||
@@ -1438,8 +1438,8 @@ static int xmldoc_parse_specialtags(struct ast_xml_node *fixnode, const char *ta
|
||||
/* parse <para> elements inside special tags. */
|
||||
for (node = ast_xml_node_get_children(node); node; node = ast_xml_node_get_next(node)) {
|
||||
/* first <para> just print it without tabs at the begining. */
|
||||
if ((xmldoc_parse_para(node, (!count ? "" : tabs), posttabs, buffer) == 2)
|
||||
|| (xmldoc_parse_info(node, (!count ? "": tabs), posttabs, buffer) == 2)) {
|
||||
if ((xmldoc_parse_para(node, "", posttabs, buffer) == 2)
|
||||
|| (xmldoc_parse_info(node, "", posttabs, buffer) == 2)) {
|
||||
ret = 2;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user