comparison libpurple/xmlnode.c @ 20336:b93e7be3847b

applied changes from 9d35dde0c779cca73548172223ba557f27d61882 through cd26f6af7f8ee75ef909ae08b06ad5a1978051d9
author Luke Schierer <lschiere@pidgin.im>
date Sat, 20 Oct 2007 15:57:22 +0000
parents 3a9709bfde65
children 78f3361f5e62
comparison
equal deleted inserted replaced
20335:5defb0546059 20336:b93e7be3847b
129 for(attr_node = node->child; attr_node; attr_node = attr_node->next) 129 for(attr_node = node->child; attr_node; attr_node = attr_node->next)
130 { 130 {
131 if(attr_node->type == XMLNODE_TYPE_ATTRIB && 131 if(attr_node->type == XMLNODE_TYPE_ATTRIB &&
132 !strcmp(attr_node->name, attr)) 132 !strcmp(attr_node->name, attr))
133 { 133 {
134 if(node->child == attr_node) { 134 if(sibling == NULL) {
135 node->child = attr_node->next; 135 node->child = attr_node->next;
136 } else { 136 } else {
137 sibling->next = attr_node->next; 137 sibling->next = attr_node->next;
138 } 138 }
139 if (node->lastchild == attr_node) { 139 if (node->lastchild == attr_node) {
172 { 172 {
173 if(attr_node->type == XMLNODE_TYPE_ATTRIB && 173 if(attr_node->type == XMLNODE_TYPE_ATTRIB &&
174 !strcmp(attr_node->name, attr) && 174 !strcmp(attr_node->name, attr) &&
175 _xmlnode_compare_xmlns(xmlns, attr_node->xmlns)) 175 _xmlnode_compare_xmlns(xmlns, attr_node->xmlns))
176 { 176 {
177 if(node->child == attr_node) { 177 if(sibling == NULL) {
178 node->child = attr_node->next; 178 node->child = attr_node->next;
179 } else { 179 } else {
180 sibling->next = attr_node->next; 180 sibling->next = attr_node->next;
181 } 181 }
182 if (node->lastchild == attr_node) { 182 if (node->lastchild == attr_node) {