diff options
author | Colin Walters <walters@verbum.org> | 2023-05-01 14:24:29 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2023-05-02 08:42:19 -0400 |
commit | 453aed97f688c606622562145fa1f7c10096ba14 (patch) | |
tree | 8059e3887665735f14b31a44402d5d578fcdd876 /src/ostree/ot-builtin-cat.c | |
parent | a917813bb82b6ec7083da24064439b656971748d (diff) | |
download | ostree-453aed97f688c606622562145fa1f7c10096ba14.tar.gz |
tree-wide: Run clang-format
This is a one-time tree wide reformatting to ensure consistency
going forward.
Diffstat (limited to 'src/ostree/ot-builtin-cat.c')
-rw-r--r-- | src/ostree/ot-builtin-cat.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ostree/ot-builtin-cat.c b/src/ostree/ot-builtin-cat.c index 6d9736ea..58201b7c 100644 --- a/src/ostree/ot-builtin-cat.c +++ b/src/ostree/ot-builtin-cat.c @@ -21,9 +21,9 @@ #include "config.h" -#include "ot-main.h" -#include "ot-builtins.h" #include "ostree.h" +#include "ot-builtins.h" +#include "ot-main.h" #include "otutil.h" #include <gio/gunixoutputstream.h> @@ -38,28 +38,28 @@ static GOptionEntry options[] = { }; static gboolean -cat_one_file (GFile *f, - GOutputStream *stdout_stream, - GCancellable *cancellable, - GError **error) +cat_one_file (GFile *f, GOutputStream *stdout_stream, GCancellable *cancellable, GError **error) { - g_autoptr(GInputStream) in = (GInputStream*)g_file_read (f, cancellable, error); + g_autoptr (GInputStream) in = (GInputStream *)g_file_read (f, cancellable, error); if (!in) return FALSE; - if (g_output_stream_splice (stdout_stream, in, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE, - cancellable, error) < 0) + if (g_output_stream_splice (stdout_stream, in, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE, cancellable, + error) + < 0) return FALSE; return TRUE; } gboolean -ostree_builtin_cat (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error) +ostree_builtin_cat (int argc, char **argv, OstreeCommandInvocation *invocation, + GCancellable *cancellable, GError **error) { - g_autoptr(GOptionContext) context = g_option_context_new ("COMMIT PATH..."); - g_autoptr(OstreeRepo) repo = NULL; - if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error)) + g_autoptr (GOptionContext) context = g_option_context_new ("COMMIT PATH..."); + g_autoptr (OstreeRepo) repo = NULL; + if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, + error)) return FALSE; if (argc <= 2) @@ -69,15 +69,15 @@ ostree_builtin_cat (int argc, char **argv, OstreeCommandInvocation *invocation, } const char *rev = argv[1]; - g_autoptr(GFile) root = NULL; + g_autoptr (GFile) root = NULL; if (!ostree_repo_read_commit (repo, rev, &root, NULL, NULL, error)) return FALSE; - g_autoptr(GOutputStream) stdout_stream = g_unix_output_stream_new (1, FALSE); + g_autoptr (GOutputStream) stdout_stream = g_unix_output_stream_new (1, FALSE); for (int i = 2; i < argc; i++) { - g_autoptr(GFile) f = g_file_resolve_relative_path (root, argv[i]); + g_autoptr (GFile) f = g_file_resolve_relative_path (root, argv[i]); if (!cat_one_file (f, stdout_stream, cancellable, error)) return FALSE; |