diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-18 21:50:30 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-18 22:21:34 +0800 |
commit | 3f792393c4018956c7910e82c3680540612deeda (patch) | |
tree | 4a3196d4a334588d86038887211c43267b739bb9 | |
parent | 4d119f936fa8a692219fda73b5610482b554ba27 (diff) | |
download | gsoc2013-empathy-3f792393c4018956c7910e82c3680540612deeda.tar gsoc2013-empathy-3f792393c4018956c7910e82c3680540612deeda.tar.gz gsoc2013-empathy-3f792393c4018956c7910e82c3680540612deeda.tar.bz2 gsoc2013-empathy-3f792393c4018956c7910e82c3680540612deeda.tar.lz gsoc2013-empathy-3f792393c4018956c7910e82c3680540612deeda.tar.xz gsoc2013-empathy-3f792393c4018956c7910e82c3680540612deeda.tar.zst gsoc2013-empathy-3f792393c4018956c7910e82c3680540612deeda.zip |
factor out free_iters
-rw-r--r-- | libempathy-gtk/empathy-individual-store.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c index dbea416a7..5813a5b64 100644 --- a/libempathy-gtk/empathy-individual-store.c +++ b/libempathy-gtk/empathy-individual-store.c @@ -362,6 +362,13 @@ individual_store_find_contact (EmpathyIndividualStore *self, } static void +free_iters (GList *iters) +{ + g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL); + g_list_free (iters); +} + +static void individual_store_remove_individual (EmpathyIndividualStore *self, FolksIndividual *individual) { @@ -397,8 +404,7 @@ individual_store_remove_individual (EmpathyIndividualStore *self, } } - g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL); - g_list_free (iters); + free_iters (iters); } static void @@ -520,9 +526,7 @@ individual_store_contact_set_active (EmpathyIndividualStore *self, } } - g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL); - g_list_free (iters); - + free_iters (iters); } static void individual_store_contact_active_free (ShowActiveData *data); @@ -821,8 +825,7 @@ individual_store_contact_update (EmpathyIndividualStore *self, * timeout removes the user from the contact list, really we * should remove the first timeout. */ - g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL); - g_list_free (iters); + free_iters (iters); } static void |