FS-10112: switch_xml - Renaming a C variable name and type (No behavior change)

This commit is contained in:
Marc Olivier Chouinard 2017-03-08 16:41:12 -05:00
parent f8789c0130
commit 0147d4dbc1
1 changed files with 3 additions and 3 deletions

View File

@ -1879,18 +1879,18 @@ static void do_merge(switch_xml_t in, switch_xml_t src, const char *container, c
const char *var = switch_xml_attr(param, "name"); const char *var = switch_xml_attr(param, "name");
const char *val = switch_xml_attr(param, "value"); const char *val = switch_xml_attr(param, "value");
int go = 1; switch_bool_t add_child = SWITCH_TRUE;
for (iparam = switch_xml_child(itag, tag_name); iparam; iparam = iparam->next) { for (iparam = switch_xml_child(itag, tag_name); iparam; iparam = iparam->next) {
const char *ivar = switch_xml_attr(iparam, "name"); const char *ivar = switch_xml_attr(iparam, "name");
if (var && ivar && !strcasecmp(var, ivar)) { if (var && ivar && !strcasecmp(var, ivar)) {
go = 0; add_child = SWITCH_FALSE;
break; break;
} }
} }
if (go) { if (add_child) {
iitag = switch_xml_add_child_d(itag, tag_name, 0); iitag = switch_xml_add_child_d(itag, tag_name, 0);
switch_xml_set_attr_d(iitag, "name", var); switch_xml_set_attr_d(iitag, "name", var);
switch_xml_set_attr_d(iitag, "value", val); switch_xml_set_attr_d(iitag, "value", val);