From d119439a1cf632e6e6133034f0a9945b2fa516f2 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Fri, 9 Aug 2013 11:39:11 +0400 Subject: [PATCH] (mc_search__conditions_free): use g_ptr_array_foreach(). Signed-off-by: Andrew Borodin --- lib/search/search.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/search/search.c b/lib/search/search.c index f113cd6c1..f1557a0cc 100644 --- a/lib/search/search.c +++ b/lib/search/search.c @@ -116,15 +116,7 @@ mc_search__cond_struct_free (mc_search_cond_t * mc_search_cond) static void mc_search__conditions_free (GPtrArray * array) { - gsize loop1; - - for (loop1 = 0; loop1 < array->len; loop1++) - { - mc_search_cond_t *lc_mc_search; - - lc_mc_search = (mc_search_cond_t *) g_ptr_array_index (array, loop1); - mc_search__cond_struct_free (lc_mc_search); - } + g_ptr_array_foreach (array, (GFunc) mc_search__cond_struct_free, NULL); g_ptr_array_free (array, TRUE); }