aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-18 21:50:30 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-18 22:35:33 +0800
commit381af9c51c0bf36989edfefb5ac1a02dbdde1d6f (patch)
tree6f1065827d4e9734f86ad3d07d47082a0cd780fd
parentb0bf4030adcc7b73eab4fffea81978213ebb7799 (diff)
downloadgsoc2013-empathy-381af9c51c0bf36989edfefb5ac1a02dbdde1d6f.tar
gsoc2013-empathy-381af9c51c0bf36989edfefb5ac1a02dbdde1d6f.tar.gz
gsoc2013-empathy-381af9c51c0bf36989edfefb5ac1a02dbdde1d6f.tar.bz2
gsoc2013-empathy-381af9c51c0bf36989edfefb5ac1a02dbdde1d6f.tar.lz
gsoc2013-empathy-381af9c51c0bf36989edfefb5ac1a02dbdde1d6f.tar.xz
gsoc2013-empathy-381af9c51c0bf36989edfefb5ac1a02dbdde1d6f.tar.zst
gsoc2013-empathy-381af9c51c0bf36989edfefb5ac1a02dbdde1d6f.zip
factor out free_iters
-rw-r--r--libempathy-gtk/empathy-individual-store.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index d6dc53abd..28735fa1d 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -327,6 +327,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)
{
@@ -362,8 +369,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
@@ -490,9 +496,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);
@@ -786,8 +790,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