diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2010-02-14 00:44:39 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2010-02-14 01:13:23 +0800 |
commit | 82ee2cfb806cd91b6a58a1e3d4cceabbe736ee5a (patch) | |
tree | f5d3d301c40aaadce4a01028b4ec043e8a4f53da /libempathy-gtk/empathy-chat.c | |
parent | 0306a490cce67d9df54255cd8c7d1efea4c7377f (diff) | |
download | gsoc2013-empathy-82ee2cfb806cd91b6a58a1e3d4cceabbe736ee5a.tar gsoc2013-empathy-82ee2cfb806cd91b6a58a1e3d4cceabbe736ee5a.tar.gz gsoc2013-empathy-82ee2cfb806cd91b6a58a1e3d4cceabbe736ee5a.tar.bz2 gsoc2013-empathy-82ee2cfb806cd91b6a58a1e3d4cceabbe736ee5a.tar.lz gsoc2013-empathy-82ee2cfb806cd91b6a58a1e3d4cceabbe736ee5a.tar.xz gsoc2013-empathy-82ee2cfb806cd91b6a58a1e3d4cceabbe736ee5a.tar.zst gsoc2013-empathy-82ee2cfb806cd91b6a58a1e3d4cceabbe736ee5a.zip |
Don't reinvent g_slist_foreach
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 5702adb70..4594d4d29 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -2954,9 +2954,7 @@ empathy_chat_messages_read (EmpathyChat *self) /* ...else, we can't do any acknowledging because the channel (or * indeed connection) has gone away. */ - while (priv->pending_messages != NULL) { - g_object_unref (priv->pending_messages->data); - priv->pending_messages = g_slist_delete_link ( - priv->pending_messages, priv->pending_messages); - } + g_slist_foreach (priv->pending_messages, (GFunc) g_object_unref, NULL); + g_slist_free (priv->pending_messages); + priv->pending_messages = NULL; } |