diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2015-05-04 18:22:39 -0400 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2015-05-06 21:51:19 -0400 |
commit | 4ee1acd98109e98fd0a659f43d3187597d034f05 (patch) | |
tree | 4847d102bb7353737d21bf4825a2e3c041ba221f /src/libostree/ostree-sysroot-cleanup.c | |
parent | 7a62d64968160d27cbd90aeeed754eb185135f91 (diff) | |
download | ostree-4ee1acd98109e98fd0a659f43d3187597d034f05.tar.gz |
Use g_autoptr() for GIO object types
GLib 2.44 supplies all the necessary autocleanup macros for GIO types,
and libglnx backports the relevant macros for ostree.
Diffstat (limited to 'src/libostree/ostree-sysroot-cleanup.c')
-rw-r--r-- | src/libostree/ostree-sysroot-cleanup.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libostree/ostree-sysroot-cleanup.c b/src/libostree/ostree-sysroot-cleanup.c index 02bbe567..46ad0e93 100644 --- a/src/libostree/ostree-sysroot-cleanup.c +++ b/src/libostree/ostree-sysroot-cleanup.c @@ -34,8 +34,8 @@ _ostree_sysroot_list_deployment_dirs_for_os (GFile *osdir, { gboolean ret = FALSE; const char *osname = gs_file_get_basename_cached (osdir); - gs_unref_object GFileEnumerator *dir_enum = NULL; - gs_unref_object GFile *osdeploy_dir = NULL; + g_autoptr(GFileEnumerator) dir_enum = NULL; + g_autoptr(GFile) osdeploy_dir = NULL; GError *temp_error = NULL; osdeploy_dir = g_file_get_child (osdir, "deploy"); @@ -97,8 +97,8 @@ list_all_deployment_directories (OstreeSysroot *self, GError **error) { gboolean ret = FALSE; - gs_unref_object GFileEnumerator *dir_enum = NULL; - gs_unref_object GFile *deploydir = NULL; + g_autoptr(GFileEnumerator) dir_enum = NULL; + g_autoptr(GFile) deploydir = NULL; gs_unref_ptrarray GPtrArray *ret_deployments = NULL; GError *temp_error = NULL; @@ -184,8 +184,8 @@ list_all_boot_directories (OstreeSysroot *self, GError **error) { gboolean ret = FALSE; - gs_unref_object GFileEnumerator *dir_enum = NULL; - gs_unref_object GFile *boot_ostree = NULL; + g_autoptr(GFileEnumerator) dir_enum = NULL; + g_autoptr(GFile) boot_ostree = NULL; gs_unref_ptrarray GPtrArray *ret_bootdirs = NULL; GError *temp_error = NULL; @@ -250,7 +250,7 @@ cleanup_other_bootversions (OstreeSysroot *self, gboolean ret = FALSE; int cleanup_bootversion; int cleanup_subbootversion; - gs_unref_object GFile *cleanup_boot_dir = NULL; + g_autoptr(GFile) cleanup_boot_dir = NULL; cleanup_bootversion = self->bootversion == 0 ? 1 : 0; cleanup_subbootversion = self->subbootversion == 0 ? 1 : 0; |