Mercurial > pidgin
comparison libpurple/xmlnode.c @ 20867:faabcb979ac2
This change is really logically no change, but it is clearer as to what is going on and will prevent CID 5 and 313.
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Wed, 10 Oct 2007 01:39:20 +0000 |
| parents | 6668c0cd4687 |
| children | 78f3361f5e62 |
comparison
equal
deleted
inserted
replaced
| 20866:af40f2766881 | 20867:faabcb979ac2 |
|---|---|
| 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) { |
