tree-wide: Use autoptr for OstreeKernelArgs

Much nicer looking.  Prep for more cleanup from
https://github.com/projectatomic/rpm-ostree/pull/1013

Closes: #1302
Approved by: peterbaouoft
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-10-25 01:48:56 +00:00
1 parent 63ce86d597
commit d76840d0c1
7 files changed
+14 -20

No files matched your search

+2 -2
View File
@@ -1130,7 +1130,7 @@ find_booted_deployment (OstreeSysroot *self,
if (root_stbuf.st_dev == self_stbuf.st_dev &&
root_stbuf.st_ino == self_stbuf.st_ino)
{
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kernel_args = NULL;
g_autoptr(OstreeKernelArgs) kernel_args = NULL;
if (!parse_kernel_commandline (&kernel_args, cancellable, error))
return FALSE;
@@ -1620,7 +1620,7 @@ clone_deployment (OstreeSysroot *sysroot,
/* Copy the bootloader config options */
OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (merge_deployment);
g_auto(GStrv) previous_args = g_strsplit (ostree_bootconfig_parser_get (bootconfig, "options"), " ", -1);
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = _ostree_kernel_args_new ();
g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_new ();
_ostree_kernel_args_append_argv (kargs, previous_args);
/* Deploy the copy */