[gnome-online-accounts/gnome-3-16] daemon: Use g_list_free_full wherever applicable
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-16] daemon: Use g_list_free_full wherever applicable
- Date: Fri, 29 May 2015 13:31:13 +0000 (UTC)
commit 090cfbfc03d5a0785adf86fd72cb246fae3ac0ea
Author: Debarshi Ray <debarshir gnome org>
Date: Wed May 27 19:11:54 2015 +0200
daemon: Use g_list_free_full wherever applicable
https://bugzilla.gnome.org/show_bug.cgi?id=693578
src/daemon/goadaemon.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index df310de..067a1a9 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -548,8 +548,7 @@ process_config_entries (GoaDaemon *self,
if (g_str_has_prefix (object_path, "/org/gnome/OnlineAccounts/Accounts/"))
existing_object_paths = g_list_prepend (existing_object_paths, g_strdup (object_path));
}
- g_list_foreach (existing_objects, (GFunc) g_object_unref, NULL);
- g_list_free (existing_objects);
+ g_list_free_full (existing_objects, g_object_unref);
}
config_object_paths = NULL;
@@ -660,10 +659,8 @@ process_config_entries (GoaDaemon *self,
g_list_free (removed);
g_list_free (added);
g_list_free (unchanged);
- g_list_foreach (existing_object_paths, (GFunc) g_free, NULL);
- g_list_free (existing_object_paths);
- g_list_foreach (config_object_paths, (GFunc) g_free, NULL);
- g_list_free (config_object_paths);
+ g_list_free_full (existing_object_paths, g_free);
+ g_list_free_full (config_object_paths, g_free);
}
/* <internal>
@@ -696,8 +693,7 @@ goa_daemon_reload_configuration (GoaDaemon *self)
process_config_entries (self, group_name_to_key_file_data);
g_hash_table_unref (group_name_to_key_file_data);
- g_list_foreach (key_files_to_free, (GFunc) g_key_file_free, NULL);
- g_list_free (key_files_to_free);
+ g_list_free_full (key_files_to_free, (GDestroyNotify) g_key_file_free);
}
static gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]