[evolution-data-server] Simplify e_contact_attr_list_free().



commit 0ad2350dbbff79d1c6fd4adf6adc79b73b145d44
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Nov 23 21:13:07 2012 -0500

    Simplify e_contact_attr_list_free().
    
    g_list_free_full() makes it a one-liner.

 addressbook/libebook/e-contact.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/libebook/e-contact.c b/addressbook/libebook/e-contact.c
index 96f54d3..ca129db 100644
--- a/addressbook/libebook/e-contact.c
+++ b/addressbook/libebook/e-contact.c
@@ -2623,8 +2623,7 @@ e_contact_attr_list_copy (GList *list)
 void
 e_contact_attr_list_free (GList *list)
 {
-	g_list_foreach (list, (GFunc)g_free, NULL);
-	g_list_free (list);
+	g_list_free_full (list, (GDestroyNotify) g_free);
 }
 
 typedef GList EContactAttrList;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]