bin/admin-cleanup: Port to decl-and-initialize style
No functional changes. Closes: #1567 Approved by: jlebon
This commit is contained in:
parent
f0708b3441
commit
33d5b6f514
|
|
@ -37,21 +37,16 @@ static GOptionEntry options[] = {
|
||||||
gboolean
|
gboolean
|
||||||
ot_admin_builtin_cleanup (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
|
ot_admin_builtin_cleanup (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
|
||||||
{
|
{
|
||||||
g_autoptr(GOptionContext) context = NULL;
|
g_autoptr(GOptionContext) context = g_option_context_new ("");
|
||||||
|
|
||||||
g_autoptr(OstreeSysroot) sysroot = NULL;
|
g_autoptr(OstreeSysroot) sysroot = NULL;
|
||||||
gboolean ret = FALSE;
|
|
||||||
|
|
||||||
context = g_option_context_new ("");
|
|
||||||
|
|
||||||
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
|
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
|
||||||
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
|
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
|
||||||
invocation, &sysroot, cancellable, error))
|
invocation, &sysroot, cancellable, error))
|
||||||
goto out;
|
return FALSE;
|
||||||
|
|
||||||
if (!ostree_sysroot_cleanup (sysroot, cancellable, error))
|
if (!ostree_sysroot_cleanup (sysroot, cancellable, error))
|
||||||
goto out;
|
return FALSE;
|
||||||
|
|
||||||
ret = TRUE;
|
return TRUE;
|
||||||
out:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue