changeset 32596:66876919c094

Simplify, don't loop through list twice.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 08 Sep 2011 22:14:42 +0000
parents 6c814cf24b04
children bf6f28bc24c4
files pidgin/plugins/adiumthemes/message-style.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/adiumthemes/message-style.c	Thu Sep 08 22:10:49 2011 +0000
+++ b/pidgin/plugins/adiumthemes/message-style.c	Thu Sep 08 22:14:42 2011 +0000
@@ -32,10 +32,8 @@
 static void
 glist_free_all_string(GList *list)
 {
-	GList *first = list;
-	for (; list; list = g_list_next(list))
+	for (; list; list = g_list_delete_link(list, list))
 		g_free(list->data);
-	g_list_free(first);
 }
 
 static PidginMessageStyle *