diff options
| author | Matthew Leeds <matthew.leeds@endlessm.com> | 2019-02-22 17:54:40 -0800 |
|---|---|---|
| committer | Atomic Bot <atomic-devel@projectatomic.io> | 2019-02-25 18:12:30 +0000 |
| commit | e8816b766304a58fca6c7cd59edb140e272778f9 (patch) | |
| tree | 1611d4ba5d67694c254f7995b25be92627662f3f /system-helper | |
| parent | a0d3d65476888a8a73238c686d660205b0c95ed4 (diff) | |
| download | flatpak-e8816b766304a58fca6c7cd59edb140e272778f9.tar.gz | |
Remove extra newlines in variable definiton blocks
Uncrustify has an option "nl_func_var_def_blk" which is supposed to
ensure there's a newline character between the block of variable
definitions and the rest of the function body, but it gets confused and
thinks that the first instance of "g_autoptr" or "g_auto" being used on
a variable is the start of the function body. So this commit removes
those extra newline characters and removes that option in uncrustify.cfg
so they don't get re-added the next time uncrustify is run.
Here's the command I used:
perl -0777 -i -pe 's/\n(\n\s*g_auto\()/\1/g' `git ls-tree --name-only
-r HEAD | grep \\\.[ch]$ | grep -v common/valgrind-private.h |
grep -v app/flatpak-polkit-agent-text-listener\\\.[ch]`
I ran it again with "g_autoptr" in place of "g_auto", and made a few
manual edits to add back the newline when the g_auto* was in the middle
of a function body rather than at the top.
Closes: #2715
Approved by: matthiasclasen
Diffstat (limited to 'system-helper')
| -rw-r--r-- | system-helper/flatpak-system-helper.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/system-helper/flatpak-system-helper.c b/system-helper/flatpak-system-helper.c index 0edd9e1a..34c81585 100644 --- a/system-helper/flatpak-system-helper.c +++ b/system-helper/flatpak-system-helper.c @@ -419,7 +419,6 @@ handle_deploy (FlatpakSystemHelper *object, else if (local_pull) { g_autoptr(GMainContextPopDefault) main_context = NULL; - g_autoptr(FlatpakRemoteState) state = NULL; if (!ostree_repo_remote_get_url (flatpak_dir_get_repo (system), arg_origin, @@ -1266,7 +1265,6 @@ flatpak_authorize_method_handler (GDBusInterfaceSkeleton *interface, const gchar *method_name = g_dbus_method_invocation_get_method_name (invocation); const gchar *sender = g_dbus_method_invocation_get_sender (invocation); GVariant *parameters = g_dbus_method_invocation_get_parameters (invocation); - g_autoptr(AutoPolkitSubject) subject = polkit_system_bus_name_new (sender); g_autoptr(AutoPolkitDetails) details = polkit_details_new (); const gchar *action = NULL; @@ -1600,7 +1598,6 @@ main (int argc, gboolean show_version; GBusNameOwnerFlags flags; GOptionContext *context; - g_autoptr(GError) error = NULL; const GOptionEntry options[] = { { "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, "Replace old daemon.", NULL }, |
