diff 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
line wrap: on
line diff
--- a/libpurple/xmlnode.c	Wed Oct 10 01:16:06 2007 +0000
+++ b/libpurple/xmlnode.c	Wed Oct 10 01:39:20 2007 +0000
@@ -131,7 +131,7 @@
 		if(attr_node->type == XMLNODE_TYPE_ATTRIB &&
 				!strcmp(attr_node->name, attr))
 		{
-			if(node->child == attr_node) {
+			if(sibling == NULL) {
 				node->child = attr_node->next;
 			} else {
 				sibling->next = attr_node->next;
@@ -174,7 +174,7 @@
 		   !strcmp(attr_node->name, attr) &&
 		   _xmlnode_compare_xmlns(xmlns, attr_node->xmlns))
 		{
-			if(node->child == attr_node) {
+			if(sibling == NULL) {
 				node->child = attr_node->next;
 			} else {
 				sibling->next = attr_node->next;