From: Colin Walters Date: Tue, 22 Aug 2023 21:49:28 +0000 (-0400) Subject: cmd/init: Port to C99 style X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2^2~8^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=767ca134b55ee057fd2100ae44c3adafb64854d9;p=ostree.git cmd/init: Port to C99 style Just keeping up momentum. --- diff --git a/src/ostree/ot-builtin-init.c b/src/ostree/ot-builtin-init.c index 379c2b98..114f9baa 100644 --- a/src/ostree/ot-builtin-init.c +++ b/src/ostree/ot-builtin-init.c @@ -46,26 +46,21 @@ gboolean ostree_builtin_init (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error) { - g_autoptr (GOptionContext) context = NULL; - g_autoptr (OstreeRepo) repo = NULL; - gboolean ret = FALSE; - OstreeRepoMode mode; - - context = g_option_context_new (""); + g_autoptr (GOptionContext) context = g_option_context_new (""); + g_autoptr (OstreeRepo) repo = NULL; if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error)) - goto out; + return FALSE; + OstreeRepoMode mode; if (!ostree_repo_mode_from_string (opt_mode, &mode, error)) - goto out; + return FALSE; if (!ostree_repo_set_collection_id (repo, opt_collection_id, error)) - goto out; + return FALSE; if (!ostree_repo_create (repo, mode, NULL, error)) - goto out; + return FALSE; - ret = TRUE; -out: - return ret; + return TRUE; }