summaryrefslogtreecommitdiff
path: root/src/ostree/ot-admin-builtin-switch.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-07-31 12:16:59 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2017-08-03 13:48:12 +0000
commitb929b620aebbc241caa965472f4fe351223b7a35 (patch)
tree6afafb3254b155a4fa010a46d831830975307763 /src/ostree/ot-admin-builtin-switch.c
parentaa63d0e0c55fc419a0b86e5c02a0ac8b97757a0d (diff)
downloadostree-b929b620aebbc241caa965472f4fe351223b7a35.tar.gz
tree-wide: Use g_autoptr(Ostree*)
Part of cleaning up our usage of libglnx; we want to use what's in GLib where we can. Had to change a few .c files to `#include ostree.h` early on to pick up autoptrs for the core types. Closes: #1040 Approved by: jlebon
Diffstat (limited to 'src/ostree/ot-admin-builtin-switch.c')
-rw-r--r--src/ostree/ot-admin-builtin-switch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ostree/ot-admin-builtin-switch.c b/src/ostree/ot-admin-builtin-switch.c
index 9df77f05..e54d4db5 100644
--- a/src/ostree/ot-admin-builtin-switch.c
+++ b/src/ostree/ot-admin-builtin-switch.c
@@ -44,9 +44,9 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
{
gboolean ret = FALSE;
g_autoptr(GOptionContext) context = NULL;
- glnx_unref_object OstreeSysroot *sysroot = NULL;
+ g_autoptr(OstreeSysroot) sysroot = NULL;
const char *new_provided_refspec = NULL;
- glnx_unref_object OstreeRepo *repo = NULL;
+ g_autoptr(OstreeRepo) repo = NULL;
g_autofree char *origin_refspec = NULL;
g_autofree char *origin_remote = NULL;
g_autofree char *origin_ref = NULL;
@@ -54,8 +54,8 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
g_autofree char *new_ref = NULL;
g_autofree char *new_refspec = NULL;
const char* remote;
- glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
- glnx_unref_object OstreeAsyncProgress *progress = NULL;
+ g_autoptr(OstreeSysrootUpgrader) upgrader = NULL;
+ g_autoptr(OstreeAsyncProgress) progress = NULL;
gboolean changed;
GKeyFile *old_origin;
g_autoptr(GKeyFile) new_origin = NULL;