[glib] GUnixVolumeMonitor: Make use of new g_list_copy_deep()
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GUnixVolumeMonitor: Make use of new g_list_copy_deep()
- Date: Thu, 21 Jun 2012 22:33:24 +0000 (UTC)
commit aae1633d0f0c75b7d9c2dd7b8c10eb279f70fc0d
Author: Colin Walters <walters verbum org>
Date: Thu Jun 21 18:32:06 2012 -0400
GUnixVolumeMonitor: Make use of new g_list_copy_deep()
gio/gunixvolumemonitor.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gio/gunixvolumemonitor.c b/gio/gunixvolumemonitor.c
index 26ec483..0a48486 100644
--- a/gio/gunixvolumemonitor.c
+++ b/gio/gunixvolumemonitor.c
@@ -105,28 +105,20 @@ static GList *
get_mounts (GVolumeMonitor *volume_monitor)
{
GUnixVolumeMonitor *monitor;
- GList *l;
monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);
- l = g_list_copy (monitor->mounts);
- g_list_foreach (l, (GFunc)g_object_ref, NULL);
-
- return l;
+ return g_list_copy_deep (monitor->mounts, (GCopyFunc) g_object_ref, NULL);
}
static GList *
get_volumes (GVolumeMonitor *volume_monitor)
{
GUnixVolumeMonitor *monitor;
- GList *l;
monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);
- l = g_list_copy (monitor->volumes);
- g_list_foreach (l, (GFunc)g_object_ref, NULL);
-
- return l;
+ return g_list_copy_deep (monitor->volumes, (GCopyFunc) g_object_ref, NULL);
}
static GList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]