]> git.0d.be Git - empathy.git/commitdiff
factor out free_iters
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 18 Nov 2010 13:50:30 +0000 (14:50 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 18 Nov 2010 14:21:34 +0000 (15:21 +0100)
libempathy-gtk/empathy-individual-store.c

index dbea416a773c9e588668e170143d882b8c7c60ae..5813a5b6479f3a5ef69740bbf649384f182c7057 100644 (file)
@@ -361,6 +361,13 @@ individual_store_find_contact (EmpathyIndividualStore *self,
   return l;
 }
 
+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