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/ostree/ot-builtin-trivial-httpd.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/ostree/ot-builtin-trivial-httpd.c')
-rw-r--r-- | src/ostree/ot-builtin-trivial-httpd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c index 484c496a..cde4abbe 100644 --- a/src/ostree/ot-builtin-trivial-httpd.c +++ b/src/ostree/ot-builtin-trivial-httpd.c @@ -333,7 +333,7 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GCancellable *cancellable, OtTrivialHttpd appstruct = { 0, }; OtTrivialHttpd *app = &appstruct; gs_unref_object SoupServer *server = NULL; - gs_unref_object GFileMonitor *dirmon = NULL; + g_autoptr(GFileMonitor) dirmon = NULL; context = g_option_context_new ("[DIR] - Simple webserver"); @@ -363,8 +363,8 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GCancellable *cancellable, g_autofree char *portstr = NULL; #if SOUP_CHECK_VERSION(2, 48, 0) GSList *listeners = soup_server_get_listeners (server); - gs_unref_object GSocket *listener = NULL; - gs_unref_object GSocketAddress *addr = NULL; + g_autoptr(GSocket) listener = NULL; + g_autoptr(GSocketAddress) addr = NULL; g_assert (listeners); listener = g_object_ref (listeners->data); @@ -433,7 +433,7 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GCancellable *cancellable, if (opt_autoexit) { gboolean is_symlink = FALSE; - gs_unref_object GFileInfo *info = NULL; + g_autoptr(GFileInfo) info = NULL; info = g_file_query_info (app->root, G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK, |