[telepathy-gabble/master] util.c: re-implement lm_message_node_unlink using Wocky API

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Sep 11 07:56:14 PDT 2009


---
 src/util.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/src/util.c b/src/util.c
index 17cab3c..763c4ce 100644
--- a/src/util.c
+++ b/src/util.c
@@ -127,12 +127,7 @@ void
 lm_message_node_unlink (LmMessageNode *orphan,
     LmMessageNode *parent)
 {
-  if (parent && orphan == parent->children)
-    parent->children = orphan->next;
-  if (orphan->prev)
-    orphan->prev->next = orphan->next;
-  if (orphan->next)
-    orphan->next->prev = orphan->prev;
+  parent->children = g_slist_remove (parent->children, orphan);
 }
 
 void
-- 
1.5.6.5




More information about the telepathy-commits mailing list