From: Simon McVittie Date: Wed, 10 Jun 2020 08:47:15 +0000 (+0100) Subject: Normalize C source files to end with exactly one newline X-Git-Tag: dbus-1.13.18~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeef787418d7733f145a425a634669a53804ae6c;p=thirdparty%2Fdbus.git Normalize C source files to end with exactly one newline Some editors automatically remove trailing blank lines, or automatically add a trailing newline to avoid having a trailing non-blank line that is not terminated by a newline. To avoid unrelated whitespace changes when users of such editors contribute to dbus, let's pre-emptively normalize all files. Unlike more intrusive whitespace normalization like removing trailing whitespace from each line, this seems unlikely to cause significant issues with cherry-picking changes to stable branches. Implemented by: find . -name '*.[ch]' -print0 | \ xargs -0 perl -0777 -p -i -e 's/\n+\z//g; s/\z/\n/g' Signed-off-by: Simon McVittie --- diff --git a/bus/activation-helper-bin.c b/bus/activation-helper-bin.c index f5f16d2ce..0446ee23e 100644 --- a/bus/activation-helper-bin.c +++ b/bus/activation-helper-bin.c @@ -100,4 +100,3 @@ main (int argc, char **argv) return retval; } - diff --git a/bus/activation-helper.c b/bus/activation-helper.c index 5b6a09081..8172b6cfe 100644 --- a/bus/activation-helper.c +++ b/bus/activation-helper.c @@ -546,4 +546,3 @@ error_free_parser: error: return retval; } - diff --git a/bus/config-parser-common.c b/bus/config-parser-common.c index 1d981640c..627c9013b 100644 --- a/bus/config-parser-common.c +++ b/bus/config-parser-common.c @@ -192,4 +192,3 @@ bus_config_parser_element_type_to_name (ElementType type) return NULL; } } - diff --git a/bus/config-parser-common.h b/bus/config-parser-common.h index e3775eef8..1c601e97e 100644 --- a/bus/config-parser-common.h +++ b/bus/config-parser-common.h @@ -57,4 +57,3 @@ ElementType bus_config_parser_element_name_to_type (const char *element_name); const char* bus_config_parser_element_type_to_name (ElementType type); #endif /* BUS_CONFIG_PARSER_COMMON_H */ - diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c index fd7bbf009..9a2087cff 100644 --- a/bus/config-parser-trivial.c +++ b/bus/config-parser-trivial.c @@ -750,4 +750,3 @@ finish: } #endif /* DBUS_ENABLE_EMBEDDED_TESTS */ - diff --git a/bus/config-parser.c b/bus/config-parser.c index a47b8a583..f9b704772 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -4056,4 +4056,3 @@ bus_config_parser_test (const char *test_data_dir_cstr) } #endif /* DBUS_ENABLE_EMBEDDED_TESTS */ - diff --git a/bus/policy.c b/bus/policy.c index 0e67e64cd..74cb41bd2 100644 --- a/bus/policy.c +++ b/bus/policy.c @@ -1406,4 +1406,3 @@ bus_policy_check_can_own (BusPolicy *policy, return bus_rules_check_can_own (policy->default_rules, service_name); } #endif /* DBUS_ENABLE_EMBEDDED_TESTS */ - diff --git a/bus/signals.c b/bus/signals.c index c1224e7ec..08304c5b3 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -2984,4 +2984,3 @@ bus_signals_test (const char *test_data_dir _DBUS_GNUC_UNUSED) } #endif /* DBUS_ENABLE_EMBEDDED_TESTS */ - diff --git a/dbus/dbus-address.h b/dbus/dbus-address.h index d39854394..30df44636 100644 --- a/dbus/dbus-address.h +++ b/dbus/dbus-address.h @@ -83,4 +83,3 @@ dbus_clear_address_entries (DBusAddressEntry ***pointer_to_entries) DBUS_END_DECLS #endif /* DBUS_ADDRESS_H */ - diff --git a/dbus/dbus-file-win.c b/dbus/dbus-file-win.c index e5b577a26..5385f856d 100644 --- a/dbus/dbus-file-win.c +++ b/dbus/dbus-file-win.c @@ -404,4 +404,3 @@ _dbus_create_file_exclusively (const DBusString *filename, return TRUE; } - diff --git a/dbus/dbus-file.c b/dbus/dbus-file.c index e7272d709..c0eb1acae 100644 --- a/dbus/dbus-file.c +++ b/dbus/dbus-file.c @@ -25,4 +25,3 @@ #include #include "dbus-file.h" - diff --git a/dbus/dbus-mainloop.h b/dbus/dbus-mainloop.h index fdfa74fe6..40350977e 100644 --- a/dbus/dbus-mainloop.h +++ b/dbus/dbus-mainloop.h @@ -70,4 +70,3 @@ _dbus_clear_loop (DBusLoop **pointer_to_loop) #endif /* !DOXYGEN_SHOULD_SKIP_THIS */ #endif /* DBUS_MAINLOOP_H */ - diff --git a/dbus/dbus-misc.h b/dbus/dbus-misc.h index 8b154130b..ff2a7e4b2 100644 --- a/dbus/dbus-misc.h +++ b/dbus/dbus-misc.h @@ -56,4 +56,3 @@ char *dbus_try_get_local_machine_id (DBusError *error); DBUS_END_DECLS #endif /* DBUS_MISC_H */ - diff --git a/dbus/dbus-server-debug-pipe.c b/dbus/dbus-server-debug-pipe.c index a82688d19..c396bc828 100644 --- a/dbus/dbus-server-debug-pipe.c +++ b/dbus/dbus-server-debug-pipe.c @@ -429,4 +429,3 @@ _dbus_transport_open_debug_pipe (DBusAddressEntry *entry, /** @} */ #endif /* DBUS_ENABLE_EMBEDDED_TESTS */ - diff --git a/dbus/dbus-server-socket.c b/dbus/dbus-server-socket.c index e51e946e7..bc5e3a9d3 100644 --- a/dbus/dbus-server-socket.c +++ b/dbus/dbus-server-socket.c @@ -598,4 +598,3 @@ _dbus_server_socket_own_filename (DBusServer *server, /** @} */ - diff --git a/dbus/dbus-server-win.c b/dbus/dbus-server-win.c index 5d43c87b9..890ee3288 100644 --- a/dbus/dbus-server-win.c +++ b/dbus/dbus-server-win.c @@ -93,4 +93,3 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, } /** @} */ - diff --git a/dbus/dbus-shell.h b/dbus/dbus-shell.h index 06da274ee..e6f6b5956 100644 --- a/dbus/dbus-shell.h +++ b/dbus/dbus-shell.h @@ -37,5 +37,3 @@ dbus_bool_t _dbus_shell_parse_argv (const char *command_line, DBUS_END_DECLS #endif /* DBUS_SHELL_H */ - - diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 04b3b414a..fa1307bd1 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -1503,4 +1503,3 @@ _dbus_transport_open_socket(DBusAddressEntry *entry, } /** @} */ - diff --git a/tools/dbus-monitor.c b/tools/dbus-monitor.c index c6f36d592..fcc923eea 100644 --- a/tools/dbus-monitor.c +++ b/tools/dbus-monitor.c @@ -600,4 +600,3 @@ main (int argc, char *argv[]) fprintf (stderr, "Error: %s\n", error.message); exit (1); } - diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c index 547f72f86..2ce7f68b6 100644 --- a/tools/dbus-print-message.c +++ b/tools/dbus-print-message.c @@ -600,4 +600,3 @@ print_message (DBusMessage *message, dbus_bool_t literal, long sec, long usec) fflush (stdout); } - diff --git a/tools/strtoll.c b/tools/strtoll.c index 7360c6302..00f14c3c7 100644 --- a/tools/strtoll.c +++ b/tools/strtoll.c @@ -164,4 +164,3 @@ noconv: *endptr = (char *)(any ? s - 1 : nptr); return (acc); } -