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.
This commit is contained in:
1 parent
7a62d64968
commit
4ee1acd981
51 files changed
+320
-320
No files matched your search
@@ -40,7 +40,7 @@ cat_one_file (GFile *f,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
gs_unref_object GInputStream *in = NULL;
|
||||
g_autoptr(GInputStream) in = NULL;
|
||||
|
||||
in = (GInputStream*)g_file_read (f, cancellable, error);
|
||||
if (!in)
|
||||
@@ -66,9 +66,9 @@ ostree_builtin_cat (int argc, char **argv, GCancellable *cancellable, GError **e
|
||||
gboolean ret = FALSE;
|
||||
int i;
|
||||
const char *rev;
|
||||
gs_unref_object GOutputStream *stdout_stream = NULL;
|
||||
gs_unref_object GFile *root = NULL;
|
||||
gs_unref_object GFile *f = NULL;
|
||||
g_autoptr(GOutputStream) stdout_stream = NULL;
|
||||
g_autoptr(GFile) root = NULL;
|
||||
g_autoptr(GFile) f = NULL;
|
||||
|
||||
context = g_option_context_new ("COMMIT PATH... - Concatenate contents of files");
|
||||
|
||||
|
||||
Reference in new issue
Block a user