]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Normalize C source files to end with exactly one newline
authorSimon McVittie <smcv@collabora.com>
Wed, 10 Jun 2020 08:47:15 +0000 (09:47 +0100)
committerSimon McVittie <smcv@collabora.com>
Wed, 10 Jun 2020 10:47:31 +0000 (10:47 +0000)
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 <smcv@collabora.com>
21 files changed:
bus/activation-helper-bin.c
bus/activation-helper.c
bus/config-parser-common.c
bus/config-parser-common.h
bus/config-parser-trivial.c
bus/config-parser.c
bus/policy.c
bus/signals.c
dbus/dbus-address.h
dbus/dbus-file-win.c
dbus/dbus-file.c
dbus/dbus-mainloop.h
dbus/dbus-misc.h
dbus/dbus-server-debug-pipe.c
dbus/dbus-server-socket.c
dbus/dbus-server-win.c
dbus/dbus-shell.h
dbus/dbus-transport-socket.c
tools/dbus-monitor.c
tools/dbus-print-message.c
tools/strtoll.c

index f5f16d2cefa24b79e091a8cbbc6b263e5138c44b..0446ee23ed1fce7434f792d1d86042129eb0c626 100644 (file)
@@ -100,4 +100,3 @@ main (int argc, char **argv)
 
   return retval;
 }
-
index 5b6a0908199031e8a41fbd1bf7f5998abbe58772..8172b6cfe8903e7dfeace312e1e89a62c241707d 100644 (file)
@@ -546,4 +546,3 @@ error_free_parser:
 error:
   return retval;
 }
-
index 1d981640c76746cb1fa27739501e5937e64e4dd0..627c9013b6e9d41c329914c92f79386ae34a73dd 100644 (file)
@@ -192,4 +192,3 @@ bus_config_parser_element_type_to_name (ElementType type)
       return NULL;
     }
 }
-
index e3775eef8b4390d9877d71c3fd9b032ab3afbf5b..1c601e97e55f9f8767b892230d7b63359f9c49c5 100644 (file)
@@ -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 */
-
index fd7bbf009b82f5b424595a137126a192ad364033..9a2087cffc884eb0915211abd02c0f40017b4cc5 100644 (file)
@@ -750,4 +750,3 @@ finish:
 }
 
 #endif /* DBUS_ENABLE_EMBEDDED_TESTS */
-
index a47b8a583a0fe9d19329e1b1a3fd5ab81d4ed64b..f9b704772197c00a60ac6ee7e3fda1424f25e6d1 100644 (file)
@@ -4056,4 +4056,3 @@ bus_config_parser_test (const char *test_data_dir_cstr)
 }
 
 #endif /* DBUS_ENABLE_EMBEDDED_TESTS */
-
index 0e67e64cda449087b7a2789e1e29eb2e55c36963..74cb41bd20e2c5caaf42229bde2df482de9ef642 100644 (file)
@@ -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 */
-
index c1224e7ec8bb070903efe5980dc03510d5815796..08304c5b381dee3ac9981f811970b4aab519f986 100644 (file)
@@ -2984,4 +2984,3 @@ bus_signals_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
 }
 
 #endif /* DBUS_ENABLE_EMBEDDED_TESTS */
-
index d3985439401c5f4ac77aafa1aff45092dbf8d063..30df446363808949312345273aae142ae33b8844 100644 (file)
@@ -83,4 +83,3 @@ dbus_clear_address_entries (DBusAddressEntry ***pointer_to_entries)
 DBUS_END_DECLS
 
 #endif /* DBUS_ADDRESS_H */
-
index e5b577a26284488a46fbbecf58c898145cceeafe..5385f856d10fce4997da19612afe4c18d77b9eef 100644 (file)
@@ -404,4 +404,3 @@ _dbus_create_file_exclusively (const DBusString *filename,
 
   return TRUE;
 }
-
index e7272d70976d46732daca4ce9c8f588032a8314d..c0eb1acae72b7318ed7c87d5003d45f01ead8c07 100644 (file)
@@ -25,4 +25,3 @@
 #include <config.h>
 
 #include "dbus-file.h"
-
index fdfa74fe65b27c107414ea2a2583e56bdfa1c1a2..40350977e5e9fed3b6ee55f2cf38db1c3c4febc6 100644 (file)
@@ -70,4 +70,3 @@ _dbus_clear_loop (DBusLoop **pointer_to_loop)
 #endif /* !DOXYGEN_SHOULD_SKIP_THIS */
 
 #endif /* DBUS_MAINLOOP_H */
-
index 8b154130bbf12b438b47039182959a2f60634b02..ff2a7e4b24051e26ce5829e7ffa2b2b4327311ea 100644 (file)
@@ -56,4 +56,3 @@ char *dbus_try_get_local_machine_id (DBusError *error);
 DBUS_END_DECLS
 
 #endif /* DBUS_MISC_H */
-
index a82688d192f337085c6b062796c00c64905d9303..c396bc82823af5b292987a5480381ade2af799d4 100644 (file)
@@ -429,4 +429,3 @@ _dbus_transport_open_debug_pipe (DBusAddressEntry  *entry,
 /** @} */
 
 #endif /* DBUS_ENABLE_EMBEDDED_TESTS */
-
index e51e946e74d7ae1901b6dfb8145cb82582bd062b..bc5e3a9d306641c0cd84d1976b92e563fdfecadd 100644 (file)
@@ -598,4 +598,3 @@ _dbus_server_socket_own_filename (DBusServer *server,
 
 
 /** @} */
-
index 5d43c87b9aa7a1c7d91dd702fe66648599c70d33..890ee3288ad2712a213835346841a4b1e467985a 100644 (file)
@@ -93,4 +93,3 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry,
 }
 
 /** @} */
-
index 06da274ee231ce7bde33c9e2c2793d4de22d1a3a..e6f6b5956f4bc6e31cbc03de5c2a09d7aa74e5b5 100644 (file)
@@ -37,5 +37,3 @@ dbus_bool_t _dbus_shell_parse_argv (const char *command_line,
 DBUS_END_DECLS
 
 #endif /* DBUS_SHELL_H */
-
-
index 04b3b414a015bc6a832d9ff7905436fc439f68ab..fa1307bd12ac568a3df93b7af09ab151d9ad7207 100644 (file)
@@ -1503,4 +1503,3 @@ _dbus_transport_open_socket(DBusAddressEntry  *entry,
 }
 
 /** @} */
-
index c6f36d59203da8983ca8746f63b2136a777c3f4f..fcc923eeaf60b43920d4682c62cf9675716f93b7 100644 (file)
@@ -600,4 +600,3 @@ main (int argc, char *argv[])
   fprintf (stderr, "Error: %s\n", error.message);
   exit (1);
 }
-
index 547f72f86c826542acb89caf326cf29600fb81a9..2ce7f68b6fd4c48fef06dccf4885e6af15bb4a7e 100644 (file)
@@ -600,4 +600,3 @@ print_message (DBusMessage *message, dbus_bool_t literal, long sec, long usec)
   fflush (stdout);
   
 }
-
index 7360c630252a41a147c6c581bd99f02556c9e34d..00f14c3c7fda8f6d8bba2bdcd5be12b2c167ad75 100644 (file)
@@ -164,4 +164,3 @@ noconv:
                *endptr = (char *)(any ? s - 1 : nptr);
        return (acc);
 }
-