]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: drop spurious newlines (#8764)
authorLennart Poettering <lennart@poettering.net>
Thu, 19 Apr 2018 10:13:23 +0000 (12:13 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 19 Apr 2018 10:13:23 +0000 (12:13 +0200)
Double newlines (i.e. one empty lines) are great to structure code. But
let's avoid triple newlines (i.e. two empty lines), quadruple newlines,
quintuple newlines, …, that's just spurious whitespace.

It's an easy way to drop 121 lines of code, and keeps the coding style
of our sources a bit tigther.

91 files changed:
man/file-hierarchy.xml
man/journal-remote.conf.xml
man/journald.conf.xml
man/sd-id128.xml
man/sd_get_seats.xml
man/sd_journal_get_catalog.xml
man/systemd-journal-upload.xml
man/systemd.exec.xml
man/systemd.network.xml
man/systemd.timer.xml
src/analyze/analyze.c
src/basic/format-table.c
src/basic/hash-funcs.c
src/basic/mount-util.c
src/basic/random-util.c
src/basic/ratelimit.c
src/basic/selinux-util.c
src/basic/socket-util.c
src/boot/efi/measure.c
src/busctl/busctl-introspect.c
src/busctl/busctl.c
src/core/audit-fd.c
src/core/cgroup.c
src/core/dbus-execute.c
src/core/dbus-socket.c
src/core/execute.c
src/core/job.c
src/core/killall.c
src/core/load-dropin.c
src/core/load-fragment.c
src/core/transaction.c
src/core/umount.c
src/core/unit.c
src/cryptsetup/cryptsetup-generator.c
src/hostname/hostnamed.c
src/journal-remote/journal-gatewayd.c
src/journal-remote/journal-remote.c
src/journal-remote/journal-upload.c
src/journal-remote/microhttpd-util.c
src/journal/catalog.c
src/journal/compress.c
src/journal/journalctl.c
src/journal/journald-server.c
src/journal/lookup3.c
src/libsystemd-network/lldp-neighbor.c
src/libsystemd-network/network-internal.c
src/libsystemd-network/test-dhcp6-client.c
src/libsystemd/sd-bus/bus-creds.c
src/libsystemd/sd-bus/bus-match.c
src/libsystemd/sd-bus/bus-message.c
src/libsystemd/sd-bus/bus-signature.c
src/libsystemd/sd-bus/bus-slot.c
src/libsystemd/sd-bus/sd-bus.c
src/libsystemd/sd-netlink/netlink-message.c
src/libsystemd/sd-netlink/test-netlink.c
src/locale/localed.c
src/login/logind-session.c
src/machine/machinectl.c
src/network/netdev/dummy.c
src/network/netdev/geneve.c
src/network/netdev/wireguard.c
src/network/networkd-link.c
src/nspawn/nspawn.c
src/path/path.c
src/resolve/resolvconf-compat.c
src/resolve/resolved-dns-rr.c
src/resolve/resolved-dns-transaction.c
src/shared/bus-unit-util.c
src/shared/fdset.c
src/shared/firewall-util.c
src/shared/import-util.c
src/shared/logs-show.c
src/shared/utmp-wtmp.c
src/sysusers/sysusers.c
src/test/test-exec-util.c
src/test/test-fileio.c
src/test/test-job-type.c
src/test/test-libudev.c
src/test/test-locale-util.c
src/test/test-nss.c
src/test/test-parse-util.c
src/test/test-path.c
src/test/test-stat-util.c
src/test/test-string-util.c
src/test/test-strv.c
src/test/test-unit-file.c
src/test/test-unit-name.c
src/udev/mtd_probe/probe_smartmedia.c
src/udev/scsi_id/scsi_serial.c
src/udev/udevd.c
tools/find-double-newline.sh [new file with mode: 0755]

index 423bb3a12dcbe3a831adf2daacf022293220a1b4..37cb2002d4d9c73c7c36018667d035c0c838dcdb 100644 (file)
     </variablelist>
   </refsect1>
 
-
   <refsect1>
     <title>Unprivileged Write Access</title>
 
index 24ade09023a308db39b990caaedaf6fad3fd6c77..db5e4efd5b25cef0846fb8825c354bf2f4d02b79 100644 (file)
@@ -70,7 +70,6 @@
         </para></listitem>
       </varlistentry>
 
-
       <varlistentry>
         <term><varname>SplitMode=</varname></term>
 
index 96422a3a2f3b0e5a992604be898de76af75206e3..760d649a3df49caca7356ad245e3033b33fc3d76 100644 (file)
         seconds.</para></listitem>
       </varlistentry>
 
-
       <varlistentry>
         <term><varname>SyncIntervalSec=</varname></term>
 
index 124bb3384e7c46c73aa764d3b2497ccaa0a357dc..f7a147ab305b114a6dc97e54fc33f32abac26003 100644 (file)
@@ -114,7 +114,6 @@ int main(int argc, char **argv) {
 }
     </programlisting>
 
-
     <para><function>SD_ID128_CONST_STR()</function> may be used to
     convert constant 128-bit IDs into constant strings for output. The
     following example code will output the string
index a5906fbfbb6a0c3b192d3557a97322a857ed9660..63659f8cd17276e9f32ffbb9c8360103e616166e 100644 (file)
     errno-style error code.</para>
   </refsect1>
 
-
   <refsect1>
     <title>Errors</title>
 
index 6974c7437c991bb90992a0967d70a1d489177e52..85aa189d4ffe74519195c6329cb8e54baf9c3ee1 100644 (file)
@@ -53,7 +53,6 @@
         <paramdef>char **<parameter>ret</parameter></paramdef>
       </funcprototype>
 
-
     </funcsynopsis>
   </refsynopsisdiv>
 
index fc3ecd2fdcb5d82b4af1759a701e6c0991305728..900706a34d640c096695bad6319f31b05c8d44c5 100644 (file)
         </para></listitem>
       </varlistentry>
 
-
       <varlistentry>
         <term><option>--save-state</option><optional>=<replaceable>PATH</replaceable></optional></term>
 
index 3c30f817c93157f657fa869eaca07c528aa30a15..b2ac0a26558dee76f22456c086b1998a320955d0 100644 (file)
@@ -353,7 +353,6 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting>
     </variablelist>
   </refsect1>
 
-
   <refsect1>
     <title>Security</title>
 
@@ -746,7 +745,6 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting>
     </variablelist>
   </refsect1>
 
-
   <refsect1>
     <title>Sandboxing</title>
 
@@ -2637,5 +2635,4 @@ StandardInputData=SWNrIHNpdHplIGRhIHVuJyBlc3NlIEtsb3BzLAp1ZmYgZWVtYWwga2xvcHAncy
       </para>
   </refsect1>
 
-
 </refentry>
index 0da884591af0b35e80c46c7b6811047ad61f4edb..b71e197f1138ca35e717bdbc9c8a7d9f5dce2f46 100644 (file)
       </variablelist>
   </refsect1>
 
-
   <refsect1>
     <title>[DHCPServer] Section Options</title>
     <para>The <literal>[DHCPServer]</literal> section contains
index 76a8dc4d8cdf7b1344de76453d3968dc2ee7ed9f..fea7f3ff72b8538c78f2038342b558d9aede12fc 100644 (file)
         suffix.</para></listitem>
       </varlistentry>
 
-
       <varlistentry>
         <term><varname>Persistent=</varname></term>
 
index f69264d637743017eab2f06408381fa36a8f8082..179bb0f7999a9165dc49c16dba77f268c95e62e6 100644 (file)
@@ -118,7 +118,6 @@ struct host_info {
         char *architecture;
 };
 
-
 static int acquire_systemd_bus(sd_bus **bus) {
         bool user = arg_scope != UNIT_FILE_SYSTEM;
 
@@ -565,7 +564,6 @@ static int pretty_boot_time(sd_bus *bus, char **_buf) {
         else if (!unit_id)
                 size = strpcpyf(&ptr, size, "\ncould not find default.target");
 
-
         ptr = strdup(buf);
         if (!ptr)
                 return log_oom();
index 36873fd397b32d53675bf9c95136a3c21ba54efb..ae2c6238c4e7bc18655252ae64c3ec78f3b4c95f 100644 (file)
@@ -855,7 +855,6 @@ static const char *table_data_format(TableData *d) {
                 assert_not_reached("Unexpected type?");
         }
 
-
         return d->formatted;
 }
 
index b62f2bd877e768f0fc4404ff05594e04c3ccd6af..13e357efd4bdb73fa909165c384f394d9f6bd739 100644 (file)
@@ -24,7 +24,6 @@ const struct hash_ops string_hash_ops = {
         .compare = string_compare_func
 };
 
-
 void path_hash_func(const void *p, struct siphash *state) {
         const char *q = p;
         size_t n;
index 7c36d78cc682db60e934358a9b25c40929b432a9..a6efbc3a7be97a85d8667c36f33dc27d516610db 100644 (file)
@@ -856,7 +856,6 @@ const char *mount_propagation_flags_to_string(unsigned long flags) {
         return NULL;
 }
 
-
 int mount_propagation_flags_from_string(const char *name, unsigned long *ret) {
 
         if (isempty(name))
index 5095cee91b00f72ef14df4b1b8daaf2636d06968..1623932f18e13390f34d6da2fe24861407ecf767 100644 (file)
@@ -109,7 +109,6 @@ void initialize_srand(void) {
 #endif
                 x = 0;
 
-
         x ^= (unsigned) now(CLOCK_REALTIME);
         x ^= (unsigned) gettid();
 
index 5e096b8f994fdb62c1170bc7d3d1fb6109d61dce..6598b1a812e6a4363a93d2fa02778ccd1bb56b96 100644 (file)
@@ -5,7 +5,6 @@
   Copyright 2010 Lennart Poettering
 ***/
 
-
 #include <sys/time.h>
 
 #include "macro.h"
index 6f370f9cba8e764de1c5a833f929491f860f51f2..aba3e4f15d8990a509ac65fbf8cd36cf453f2b8d 100644 (file)
@@ -315,7 +315,6 @@ char* mac_selinux_free(char *label) {
         if (!mac_selinux_use())
                 return NULL;
 
-
         freecon(label);
 #endif
 
index 7766229822f80ed426db4eb57c2bf402c1d02f23..95a79f7b530e98ef04c483675595b43ed7459d64 100644 (file)
@@ -664,7 +664,6 @@ int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_
                 return -EOPNOTSUPP;
         }
 
-
         *ret = p;
         return 0;
 }
@@ -1127,7 +1126,6 @@ int flush_accept(int fd) {
         };
         int r;
 
-
         /* Similar to flush_fd() but flushes all incoming connection by accepting them and immediately closing them. */
 
         for (;;) {
index 5aaffe8fa528a83c87638a62bbb7b17594079328..ffdc4dcaf70cae73bd17c931994cda6707ac9369 100644 (file)
@@ -188,7 +188,6 @@ typedef struct tdEFI_TCG2_PROTOCOL {
         EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS GetResultOfSetActivePcrBanks;
 } EFI_TCG2;
 
-
 static EFI_STATUS tpm1_measure_to_pcr_and_event_log(const EFI_TCG *tcg, UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer,
                                                     UINTN buffer_size, const CHAR16 *description) {
         EFI_STATUS status;
index c2118b629685613a42c17a28ccb6ed45c7e17256..fc384464d6e117d04a0de7afca684d80f8afc4ec 100644 (file)
@@ -544,7 +544,6 @@ static int parse_xml_node(Context *context, const char *prefix, unsigned n_depth
 
                         break;
 
-
                 case STATE_SIGNAL_ARG:
 
                         if (t == XML_ATTRIBUTE_NAME) {
index 419d75f53eecb197e7c09af24e818c44a8ffc4af..f19edfd987428e1e2925351c28d885269d5b6ae8 100644 (file)
@@ -1462,7 +1462,6 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char
                         break;
                 }
 
-
                 case SD_BUS_TYPE_DOUBLE: {
                         double z;
 
@@ -1980,7 +1979,6 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_expect_reply = !!r;
                         break;
 
-
                 case ARG_AUTO_START:
                         r = parse_boolean(optarg);
                         if (r < 0) {
@@ -1991,7 +1989,6 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_auto_start = !!r;
                         break;
 
-
                 case ARG_ALLOW_INTERACTIVE_AUTHORIZATION:
                         r = parse_boolean(optarg);
                         if (r < 0) {
index ad19d327d31bebf80fee292ce8ea9824bce435f4..4a522c61ac571c3b4d8528ebbb59cacb46189d9c 100644 (file)
@@ -5,7 +5,6 @@
   Copyright 2012 Lennart Poettering
 ***/
 
-
 #include <errno.h>
 
 #include "audit-fd.h"
index 1308bc195c47fb22d4f82838618a042fc54768bc..426732483efbd701aed54d5d72d480f1af5b0871 100644 (file)
@@ -1692,7 +1692,6 @@ static void unit_remove_from_cgroup_realize_queue(Unit *u) {
         u->in_cgroup_realize_queue = false;
 }
 
-
 /* Check if necessary controllers and attributes for a unit are in place.
  *
  * If so, do nothing.
index 09dc93e53b04caefe5b6fd25537bd0d2ecd6275e..e36a050bdd82d76970e4c174d14c58f20e244a0a 100644 (file)
@@ -100,7 +100,6 @@ static int property_get_oom_score_adjust(
                 void *userdata,
                 sd_bus_error *error) {
 
-
         ExecContext *c = userdata;
         int32_t n;
 
@@ -130,7 +129,6 @@ static int property_get_nice(
                 void *userdata,
                 sd_bus_error *error) {
 
-
         ExecContext *c = userdata;
         int32_t n;
 
@@ -159,7 +157,6 @@ static int property_get_ioprio(
                 void *userdata,
                 sd_bus_error *error) {
 
-
         ExecContext *c = userdata;
 
         assert(bus);
@@ -178,7 +175,6 @@ static int property_get_ioprio_class(
                 void *userdata,
                 sd_bus_error *error) {
 
-
         ExecContext *c = userdata;
 
         assert(bus);
@@ -197,7 +193,6 @@ static int property_get_ioprio_priority(
                 void *userdata,
                 sd_bus_error *error) {
 
-
         ExecContext *c = userdata;
 
         assert(bus);
index 4e751478b187ac1a1304460cf9a966354d7bb687..89bc5c0a1bd737397f8eb6eeba65258b905a293f 100644 (file)
@@ -33,7 +33,6 @@ static int property_get_listen(
                 void *userdata,
                 sd_bus_error *error) {
 
-
         Socket *s = SOCKET(userdata);
         SocketPort *p;
         int r;
@@ -79,7 +78,6 @@ static int property_get_listen(
         return sd_bus_message_close_container(reply);
 }
 
-
 static int property_get_fdname(
                 sd_bus *bus,
                 const char *path,
index 6ded96571a5d1cd8004abe09a39c37c1dee05666..be44166ce37fbf39a5881dff76be4c13eef9dece 100644 (file)
@@ -4839,7 +4839,6 @@ int exec_runtime_deserialize_compat(Unit *u, const char *key, const char *value,
         } else
                 return 0;
 
-
         /* If the object is newly created, then put it to the hashmap which manages ExecRuntime objects. */
         if (rt_create) {
                 r = hashmap_put(u->manager->exec_runtime_by_id, rt_create->id, rt_create);
index ae956fa2fcc24005d99053835713cb2a140d54de..4581dd520eed73fb9187c70b00c9f0df064ef3d2 100644 (file)
@@ -563,7 +563,6 @@ int job_run_and_invalidate(Job *j) {
         job_set_state(j, JOB_RUNNING);
         job_add_to_dbus_queue(j);
 
-
         switch (j->type) {
 
                 case JOB_VERIFY_ACTIVE: {
index 69068589186f902f83118577ab0c2700bae6be83..29db2ae7e3371f3bc19678297acbe99b79863805 100644 (file)
@@ -198,7 +198,6 @@ static int killall(int sig, Set *pids, bool send_sighup) {
                         make sure to only send this after SIGTERM so
                         that SIGTERM is always first in the queue. */
 
-
                         if (get_ctty_devnr(pid, NULL) >= 0)
                                 /* it's OK if the process is gone, just ignore the result */
                                 (void) kill(pid, SIGHUP);
index 0a56f0df8643fe0a6f689fcfb3b26dccc6253efd..9e54614cdee676c194bfe4069e87c5979d077a74 100644 (file)
@@ -5,7 +5,6 @@
   Copyright 2010 Lennart Poettering
 ***/
 
-
 #include "conf-parser.h"
 #include "fs-util.h"
 #include "load-dropin.h"
index 61e752ad3e1ca2cd9ec8af9b736dc1785fca42ea..c0b1fbe5257f59fd60b631a118b2d1b6367976b0 100644 (file)
@@ -1166,7 +1166,6 @@ int config_parse_exec_cpu_sched_policy(const char *unit,
                                        void *data,
                                        void *userdata) {
 
-
         ExecContext *c = data;
         int x;
 
@@ -1458,7 +1457,6 @@ int config_parse_exec_mount_flags(
                 void *data,
                 void *userdata) {
 
-
         ExecContext *c = data;
         int r;
 
index 930b3f406b04bf52c9469a0ba5881919870d8cd7..70e78237b57bc7cc3b240c22cbdd7be730c2cb72 100644 (file)
@@ -920,7 +920,6 @@ int transaction_add_job_and_dependencies(
                                          "Job type %s is not applicable for unit %s.",
                                          job_type_to_string(type), unit->id);
 
-
         /* First add the job. */
         ret = transaction_add_one_job(tr, type, unit, &is_new);
         if (!ret)
index 870194a46b625f82d51410a3a3f5343e381288f4..017162f2fb3e12ea321b0646566bd62a1035d08c 100644 (file)
@@ -111,7 +111,6 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) {
                     path_startswith(p, "/proc"))
                         continue;
 
-
                 /* If we are in a container, don't attempt to
                  * read-only mount anything as that brings no real
                  * benefits, but might confuse the host, as we remount
index 01e7cc968345eed2131736a0c59d337ec4fd364e..09574da5ce1f19894a6a38220485e68e17d6d7bc 100644 (file)
@@ -3592,7 +3592,6 @@ void unit_deserialize_skip(FILE *f) {
         }
 }
 
-
 int unit_add_node_dependency(Unit *u, const char *what, bool wants, UnitDependency dep, UnitDependencyMask mask) {
         Unit *device;
         _cleanup_free_ char *e = NULL;
index 113ee59bd9fb6314016f3c10e8278a3304ff7598..4103e0eed68a10e2798eaeb6a4736b771502eaa1 100644 (file)
@@ -160,7 +160,6 @@ static int create_disk(
                         "RequiresMountsFor=%s\n",
                         u_escaped);
 
-
         r = generator_write_timeouts(arg_dest, device, name, options, &filtered);
         if (r < 0)
                 return r;
index f847a7314b7835bee9c15a45b1af562470cb70b4..c73390cfdf5337647b237d0df444503f0f4fefc9 100644 (file)
@@ -248,7 +248,6 @@ static char* context_fallback_icon_name(Context *c) {
         return strdup("computer");
 }
 
-
 static bool hostname_is_useful(const char *hn) {
         return !isempty(hn) && !is_localhost(hn);
 }
index 27544c8ae50fdfc6bd8544712a40f87cc8ba5006..7399d3315f04f3a72bad0edd3a88c33fad459bcf 100644 (file)
@@ -835,7 +835,6 @@ static int request_handler(
         if (!streq(method, "GET"))
                 return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE, "Unsupported method.");
 
-
         if (!*connection_cls) {
                 if (!request_meta(connection_cls))
                         return respond_oom(connection);
index 86d541a17c0a66ddfcd908803148e87c1c023c99..995083655a8ab8c515304ad28e26844cf0c03d5e 100644 (file)
@@ -686,7 +686,6 @@ static int setup_microhttpd_server(RemoteServer *s,
         log_debug("Started MHD %s daemon on fd:%d (wrapper @ %p)",
                   key ? "HTTPS" : "HTTP", fd, d);
 
-
         info = MHD_get_daemon_info(d->daemon, MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY);
         if (!info) {
                 log_error("µhttp returned NULL daemon info");
@@ -1577,7 +1576,6 @@ int main(int argc, char **argv) {
         if (r <= 0)
                 return r == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 
-
         if (arg_listen_http || arg_listen_https) {
                 r = setup_gnutls_logger(arg_gnutls_log);
                 if (r < 0)
index 6df87560fbda4a064a72f536a898ca839a0deb35..5194b3136f69b0523bc1b5f595b9cb9fd98bec2b 100644 (file)
@@ -167,8 +167,6 @@ static int load_cursor_state(Uploader *u) {
         return 0;
 }
 
-
-
 int start_upload(Uploader *u,
                  size_t (*input_callback)(void *ptr,
                                           size_t size,
index 17fa48fe5b9cf757dc51c748ffdaf408241706bb..9cb7dfc9203b8780e5e829409c5f9f5baf2aa12c 100644 (file)
@@ -33,7 +33,6 @@ void microhttpd_logger(void *arg, const char *fmt, va_list ap) {
         REENABLE_WARNING;
 }
 
-
 static int mhd_respond_internal(struct MHD_Connection *connection,
                                 enum MHD_RequestTerminationCode code,
                                 const char *buffer,
index 9578ffffe58d4fab423996ed8b7cbf1338be39bf..9c13d7b46d6b879068047962279eccce3c742c4c 100644 (file)
@@ -681,7 +681,6 @@ static void dump_catalog_entry(FILE *f, sd_id128_t id, const char *s, bool oneli
                         SD_ID128_FORMAT_VAL(id), s);
 }
 
-
 int catalog_list(FILE *f, const char *database, bool oneline) {
         _cleanup_close_ int fd = -1;
         void *p = NULL;
index db816aa6ab44cd4f4c3a2412f72e744df28b0a5b..c09dbb1778c5da165bae25ada75726ecc80032cd 100644 (file)
@@ -117,7 +117,6 @@ int compress_blob_lz4(const void *src, uint64_t src_size,
 #endif
 }
 
-
 int decompress_blob_xz(const void *src, uint64_t src_size,
                        void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max) {
 
@@ -231,7 +230,6 @@ int decompress_blob(int compression,
                 return -EBADMSG;
 }
 
-
 int decompress_startswith_xz(const void *src, uint64_t src_size,
                              void **buffer, size_t *buffer_size,
                              const void *prefix, size_t prefix_len,
index 948bdd1cb238c6d4ccbe873cc819a8fde9733155..907f32bf8da6f6be35392fa4a1cc82f1d62d5cca 100644 (file)
@@ -716,7 +716,6 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_action = ACTION_SETUP_KEYS;
                         break;
 
-
                 case ARG_VERIFY_KEY:
                         arg_action = ACTION_VERIFY;
                         r = free_and_strdup(&arg_verify_key, optarg);
@@ -969,7 +968,6 @@ static int parse_argv(int argc, char *argv[]) {
                 arg_system_units = strv_free(arg_system_units);
         }
 
-
 #if HAVE_PCRE2
         if (arg_pattern) {
                 unsigned flags;
@@ -1644,7 +1642,6 @@ static int add_priorities(sd_journal *j) {
         return 0;
 }
 
-
 static int add_syslog_identifier(sd_journal *j) {
         int r;
         char **i;
index 13af80bcb48bc2fbd978489df3d283d1df2dabb0..391fc417eb625bcdcbae9eab41f83ddaa0c5b158 100644 (file)
@@ -167,7 +167,6 @@ static void patch_min_use(JournalStorage *storage) {
         storage->metrics.min_use = MAX(storage->metrics.min_use, storage->space.vfs_used);
 }
 
-
 static int determine_space(Server *s, uint64_t *available, uint64_t *limit) {
         JournalStorage *js;
         int r;
index ec725ce46ccd2a856037e1b3316f92ef4b65c247..ec241d2f36d2c90bbf494272be85fc1d87d265f9 100644 (file)
@@ -214,7 +214,6 @@ uint32_t        initval)         /* the previous hash, or an arbitrary value */
   return c;
 }
 
-
 /*
 --------------------------------------------------------------------
 hashword2() -- same as hashword(), but take two seeds and return two
@@ -260,7 +259,6 @@ uint32_t       *pb)               /* IN: more seed OUT: secondary hash value */
   *pc=c; *pb=b;
 }
 
-
 /*
 -------------------------------------------------------------------------------
 hashlittle() -- hash a variable-length key into a 32-bit value
@@ -458,7 +456,6 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval)
   return c;
 }
 
-
 /*
  * hashlittle2: return 2 32-bit hash values
  *
@@ -644,8 +641,6 @@ void jenkins_hashlittle2(
   *pc=c; *pb=b;
 }
 
-
-
 /*
  * hashbig():
  * This is the same as hashword() on big-endian machines.  It is different
@@ -775,7 +770,6 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval)
   return c;
 }
 
-
 #ifdef SELF_TEST
 
 /* used for timings */
@@ -967,7 +961,6 @@ void driver3()
   uint8_t buf[1];
   uint32_t h,i,state[HASHSTATE];
 
-
   buf[0] = ~0;
   for (i=0; i<HASHSTATE; ++i) state[i] = 1;
   printf("These should all be different\n");
@@ -999,7 +992,6 @@ void driver5()
   printf("hash is %.8lx\n", c);   /* cd628161 */
 }
 
-
 int main()
 {
   driver1();   /* test that the key is hashed: used for timings */
index bba2e047da469d2aa8dde70b16b5d68dfd6c723a..4aee537fd527c7dd248350c79ec7a3a649a592db 100644 (file)
@@ -328,7 +328,6 @@ int lldp_neighbor_parse(sd_lldp_neighbor *n) {
                         break;
                 }
 
-
                 p += length, left -= length;
         }
 
index 148281c59d64dbce5cbe17ffa7a41f3208a7d9b9..78ef1eb3cff8199e8e6679ce23fd0194115ef9d6 100644 (file)
@@ -379,7 +379,6 @@ int config_parse_bridge_port_priority(
         return 0;
 }
 
-
 void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size) {
         unsigned i;
 
index fc3a70d07d8cbef20dddcad8bdc72d8ea08e2ec1..f139484a863e204da4a10f4adbb505f8d7da9634 100644 (file)
@@ -571,7 +571,6 @@ static int test_client_verify_request(DHCP6Message *request, size_t len) {
                         assert_se(!found_iana);
                         found_iana = true;
 
-
                         assert_se(optlen == 40);
                         assert_se(!memcmp(optval, &test_iaid, sizeof(test_iaid)));
 
index 303d111159fbf8c00f6e0223bf5f1534f07daf9f..b28041ecc37ffd2f51a618ef2a60eacc20a843e8 100644 (file)
@@ -116,7 +116,6 @@ _public_ sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c) {
                 sd_bus_message_unref(m);
         }
 
-
         return NULL;
 }
 
@@ -209,7 +208,6 @@ _public_ int sd_bus_creds_get_suid(sd_bus_creds *c, uid_t *suid) {
         return 0;
 }
 
-
 _public_ int sd_bus_creds_get_fsuid(sd_bus_creds *c, uid_t *fsuid) {
         assert_return(c, -EINVAL);
         assert_return(fsuid, -EINVAL);
index 3f214dcfe18b19b78d06b1772239bea8180ca1a0..7a5da73def2886767ae1532395bbd1216b96a917 100644 (file)
@@ -894,7 +894,6 @@ int bus_match_parse(
                 components[n_components].value_u8 = u;
                 n_components++;
 
-
                 if (q[quoted] == 0)
                         break;
 
index 0be4e23e503d7988581906a4244f265b11ae84af..19683eef8285d7af05f99c17d8861b53f20aa090 100644 (file)
@@ -3221,7 +3221,6 @@ end:
         return 0;
 }
 
-
 static int message_peek_body(
                 sd_bus_message *m,
                 size_t *rindex,
@@ -5315,7 +5314,6 @@ int bus_message_parse_fields(sd_bus_message *m) {
 
                         break;
 
-
                 case BUS_MESSAGE_HEADER_SIGNATURE: {
                         const char *s;
                         char *c;
index ab9afdb499a1efe41bc54cf39f0b41256058f093..662a1eac5f78775554ef4095333b0244382828ea 100644 (file)
@@ -96,7 +96,6 @@ static int signature_element_length_internal(
         return -EINVAL;
 }
 
-
 int signature_element_length(const char *s, size_t *l) {
         return signature_element_length_internal(s, true, 0, 0, l);
 }
index 06b9b0edb2b476708ce1b9197068f6ab50b78788..3745426c5c03d9fac353c8ad330c799e92a5c4fd 100644 (file)
@@ -157,7 +157,6 @@ void bus_slot_disconnect(sd_bus_slot *slot) {
                                         key.interface = slot->node_vtable.interface;
                                         key.member = v->x.method.member;
 
-
                                         x = hashmap_remove(slot->bus->vtable_properties, &key);
                                         break;
                                 }}
index e5966cfe2ef67a4b536b9b993023d5f70ca0f243..0c38589c2d4f6510646d051bcd58e6655683f5bc 100644 (file)
@@ -3677,7 +3677,6 @@ _public_ int sd_bus_default_system(sd_bus **ret) {
         return bus_default(sd_bus_open_system, &default_system_bus, ret);
 }
 
-
 _public_ int sd_bus_default_user(sd_bus **ret) {
         return bus_default(sd_bus_open_user, &default_user_bus, ret);
 }
index 6449d421b34160030ea2ea36c00ddb1fc12780bb..3b792dd5a7b7f986d2bdf3deca208894f9e2eb9c 100644 (file)
@@ -298,7 +298,6 @@ int sd_netlink_message_append_u8(sd_netlink_message *m, unsigned short type, uin
         return 0;
 }
 
-
 int sd_netlink_message_append_u16(sd_netlink_message *m, unsigned short type, uint16_t data) {
         int r;
 
index dfbb76f61fc4dd7d33f6a40377f33e4f90257aac..3ef611d165a1d9fe90be818f0200cad0df794200 100644 (file)
@@ -107,7 +107,6 @@ static void test_link_get(sd_netlink *rtnl, int ifindex) {
         assert_se((r = sd_netlink_message_unref(r)) == NULL);
 }
 
-
 static void test_address_get(sd_netlink *rtnl, int ifindex) {
         sd_netlink_message *m;
         sd_netlink_message *r;
index 84399bbe93ffcf0e7428a73eac5bbfdd07e7fcbd..4559168d007e2f40c6e5a7433493d975c94449be 100644 (file)
@@ -343,7 +343,6 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
         } else
                 log_debug("Locale settings were not modified.");
 
-
         return sd_bus_reply_method_return(m, NULL);
 }
 
index d9277501d2070bbc0104be299160448c6444046a..eb131ae50cedb364d901f5a4ccb332c6f8579e14 100644 (file)
@@ -254,7 +254,6 @@ int session_save(Session *s) {
         if (s->desktop) {
                 _cleanup_free_ char *escaped;
 
-
                 escaped = cescape(s->desktop);
                 if (!escaped) {
                         r = -ENOMEM;
index b2909a76a2ff098da3ace7946baf68f41c4cc9c5..d038e78d1968f62b144369f3e0395631eeaadbba 100644 (file)
@@ -1062,7 +1062,6 @@ static int show_pool_info(sd_bus *bus) {
         return 0;
 }
 
-
 static int show_image_properties(sd_bus *bus, const char *path, bool *new_line) {
         int r;
 
index 6a4390ea2db19da14f31062ee7d78c0cf28ea927..26f58a52a662ec2ced58bacd564ffe71e0d10a06 100644 (file)
@@ -6,7 +6,6 @@
   Copyright 2014 Tom Gundersen
 ***/
 
-
 #include "netdev/dummy.h"
 
 const NetDevVTable dummy_vtable = {
index 150947c9e0f71214d1c83a5e38672873b8711c81..03039439810e68bc73ad7f745f72a87baf9ff1ba 100644 (file)
@@ -150,7 +150,6 @@ static int netdev_geneve_create(NetDev *netdev) {
 
         log_netdev_debug(netdev, "Creating");
 
-
         return r;
 }
 
index a1c1c2a51f2605fc033ed32a56d3aa06c97a8dbf..c79f2d283d612554b5984c6e6b09f0591c2f0ca0 100644 (file)
@@ -315,7 +315,6 @@ static void resolve_endpoints(NetDev *netdev) {
         }
 }
 
-
 static int netdev_wireguard_post_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
         Wireguard *w;
 
@@ -455,7 +454,6 @@ int config_parse_wireguard_preshared_key(const char *unit,
                                    peer->preshared_key);
 }
 
-
 int config_parse_wireguard_public_key(const char *unit,
                                       const char *filename,
                                       unsigned line,
index c921f92d148cd67d93fa9dc95964498ae4ba642e..d2ec6ce9d6ea118d7af7ea0e06dd03f1ea89ee13 100644 (file)
@@ -1150,7 +1150,6 @@ static int link_enter_set_addresses(Link *link) {
                                 log_link_warning_errno(link, r, "Failed to set DNS server for DHCP server, ignoring: %m");
                 }
 
-
                 if (link->network->dhcp_server_emit_ntp) {
 
                         if (link->network->n_dhcp_server_ntp > 0)
index 7169c115765eb01be7e09abcafa18cde54332e97..a507c49b3449e2d9228fc79c0ea5da47441c447c 100644 (file)
@@ -1897,7 +1897,6 @@ static int reset_audit_loginuid(void) {
         return 0;
 }
 
-
 static int setup_propagate(const char *root) {
         const char *p, *q;
         int r;
index 52758457501a160b2541ccd5375e072b7e267b53..ea6442991b0caee08aada04086f5354b6452eb34 100644 (file)
@@ -181,7 +181,6 @@ int main(int argc, char* argv[]) {
         } else
                 r = list_homes();
 
-
 finish:
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
index 7f486107019b5567546b406e9e20cd2d1946ec81..1342e7b1f4dffcb1379acc94e086e63ebe9013c8 100644 (file)
@@ -130,7 +130,6 @@ int resolvconf_parse_argv(int argc, char *argv[]) {
                 {}
         };
 
-
         enum {
                 TYPE_REGULAR,
                 TYPE_PRIVATE,   /* -p: Not supported, treated identically to TYPE_REGULAR */
index 2ac3ef2bd2fdb524711b41ef9a67136238a042a4..4d5682ec7ea416276a6efe7ea5adb7500adc7907 100644 (file)
@@ -1232,7 +1232,6 @@ ssize_t dns_resource_record_payload(DnsResourceRecord *rr, void **out) {
                 *out = rr->tlsa.data;
                 return rr->tlsa.data_size;
 
-
         case DNS_TYPE_OPENPGPKEY:
         default:
                 *out = rr->generic.data;
index 914bd39e0a7eed0094bedbcd9df0f14ec540d12e..b0fe3497da615d20f6a0eacef8f15f04f2cc937f 100644 (file)
@@ -678,7 +678,6 @@ static int dns_transaction_dnssec_ready(DnsTransaction *t) {
                         dns_transaction_complete(t, DNS_TRANSACTION_DNSSEC_FAILED);
                         return 0;
 
-
                 default:
                         log_debug("Auxiliary DNSSEC RR query failed with %s", dns_transaction_state_to_string(dt->state));
                         goto fail;
@@ -1225,7 +1224,6 @@ static usec_t transaction_get_resend_timeout(DnsTransaction *t) {
         assert(t);
         assert(t->scope);
 
-
         switch (t->scope->protocol) {
 
         case DNS_PROTOCOL_DNS:
index 216140b24813f30a9befa6a215e7141827cbdfb6..49cee2939e4717dd70c1bfc3fe02ee22b5c02bea 100644 (file)
@@ -1098,7 +1098,6 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con
                         } else
                                 d = s;
 
-
                         r = sd_bus_message_append(m, "(ssbt)", s, d, ignore_enoent, flags);
                         if (r < 0)
                                 return bus_log_create_error(r);
index e9802bb82caadde96c44e3246f582449aaa6e301..e97a52619dd339988b42813ec1222a9956017e30 100644 (file)
@@ -206,7 +206,6 @@ int fdset_new_listen_fds(FDSet **_s, bool unset) {
         *_s = s;
         return 0;
 
-
 fail:
         if (s)
                 set_free(MAKE_SET(s));
index e0520e37cb27817a46e4f05e746c6c06916dc108..a87151d90dd948b37de4d33d5de986fd588974bc 100644 (file)
@@ -168,7 +168,6 @@ int fw_add_local_dnat(
                 uint16_t remote_port,
                 const union in_addr_union *previous_remote) {
 
-
         _cleanup_(iptc_freep) struct xtc_handle *h = NULL;
         struct ipt_entry *entry, *mask;
         struct ipt_entry_target *t;
index ba30d62dcad1fbc03f72119d2dafa02bef161578..933229387e3a9dc2d8b5752b8496aca3493cfe21 100644 (file)
@@ -42,7 +42,6 @@ int import_url_last_component(const char *url, char **ret) {
         return 0;
 }
 
-
 int import_url_change_last_component(const char *url, const char *suffix, char **ret) {
         const char *e;
         char *s;
index 0bbb7430958a237bba189f39027ac4c76acd40b6..26a1513a052bfce88399ef5526a5a1cddc1090b7 100644 (file)
@@ -52,7 +52,6 @@ static int print_catalog(FILE *f, sd_journal *j) {
         int r;
         _cleanup_free_ char *t = NULL, *z = NULL;
 
-
         r = sd_journal_get_catalog(j, &t);
         if (r < 0)
                 return r;
@@ -84,7 +83,6 @@ static int parse_field(const void *data, size_t length, const char *field, size_
 
         nl = length - field_len;
 
-
         buf = newdup_suffix0(char, (const char*) data + field_len, nl);
         if (!buf)
                 return log_oom();
index 314488ab8f2e14d141c8fded87a100de4502f7b9..5ecc23f6e572e42cd356ab5f60a64a98d1005a63 100644 (file)
@@ -275,7 +275,6 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
         return write_utmp_wtmp(&store, &store_wtmp);
 }
 
-
 int utmp_put_runlevel(int runlevel, int previous) {
         struct utmpx store = {};
         int r;
index b3c054646160cb4e74c2ae8c100e2e11f61c9994..94971ea045d17820628b6657ac9ff1c6e935ed5a 100644 (file)
@@ -1478,7 +1478,6 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                 }
         }
 
-
         switch (action[0]) {
 
         case ADD_RANGE:
index dcddbfd98865e961490e1a0549a3e786bbc47ff2..c5166c6954ad70fd173c454512bac302cc9170bd 100644 (file)
@@ -236,7 +236,6 @@ const gather_stdout_callback_t gather_stdout[] = {
         gather_stdout_three,
 };
 
-
 static void test_stdout_gathering(void) {
         char template[] = "/tmp/test-exec-util.XXXXXXX";
         const char *dirs[] = {template, NULL};
index 443afd8a86b5e1f94b101f1dcc2b6f4708385432..ba22e865fd774c20f5bf360efd50cac6880a78a5 100644 (file)
@@ -561,7 +561,6 @@ static void test_search_and_fopen(void) {
         assert_se(r < 0);
 }
 
-
 static void test_search_and_fopen_nulstr(void) {
         const char dirs[] = "/tmp/foo/bar\0/tmp\0";
         char name[] = "/tmp/test-search_and_fopen.XXXXXX";
index 57025208dbb58f28f271a7e53b770ffff4d7fc4d..fefeecb948cf630ee79de846b2bdac840be65486 100644 (file)
@@ -83,6 +83,5 @@ int main(int argc, char*argv[]) {
                 }
         }
 
-
         return 0;
 }
index 8aa76e4d0a36447ad9f46abfa12b355776c9c5c2..599219e326a9459af86261674b19a0920fb022f1 100644 (file)
@@ -394,7 +394,6 @@ int main(int argc, char *argv[]) {
                         assert_not_reached("Unhandled option code.");
                 }
 
-
         /* add sys path if needed */
         if (!startswith(syspath, "/sys"))
                 syspath = strjoina("/sys/", syspath);
index 5008630e018017386950ca3829325b48a03f1e12..d26e633466d9a120250bca10b208c491dc003f11 100644 (file)
@@ -5,7 +5,6 @@
   Copyright 2014 Ronny Chevalier
 ***/
 
-
 #include "locale-util.h"
 #include "macro.h"
 #include "strv.h"
index 0b118b5b2cc13489081143842aa3c02d972f2fe1..f6dee45ac07fb984bae6773b901f4da6403ebc49 100644 (file)
@@ -181,7 +181,6 @@ static void test_gethostbyname4_r(void *handle, const char *module, const char *
         }
 }
 
-
 static void test_gethostbyname3_r(void *handle, const char *module, const char *name, int af) {
         const char *fname;
         _nss_gethostbyname3_r_t f;
@@ -401,7 +400,6 @@ static int test_one_module(const char* dir,
         char **name;
         int i;
 
-
         log_info("======== %s ========", module);
 
         handle = open_handle(streq(module, "dns") ? NULL : dir,
index 19273b2e257cf180140fd53ce622513d2f79139d..37dbb0ce7a9080bdbf66308d1ef0bd11140efd96 100644 (file)
@@ -662,7 +662,6 @@ static void test_parse_nice(void) {
         assert_se(parse_nice("19", &n) >= 0 && n == 19);
         assert_se(parse_nice("+19", &n) >= 0 && n == 19);
 
-
         assert_se(parse_nice("", &n) == -EINVAL);
         assert_se(parse_nice("-", &n) == -EINVAL);
         assert_se(parse_nice("+", &n) == -EINVAL);
index 3d990407b38e781390e851739497942e99987132..ed53177dcc8ded864c2fd15817502b487dc25f39 100644 (file)
@@ -102,7 +102,6 @@ static void check_stop_unlink(Manager *m, Unit *unit, const char *test_path, con
                                 service_state_to_string(service->state),
                                 service_result_to_string(service->result));
 
-
                 /* But we timeout if the service has not been started in the allocated time */
                 n = now(CLOCK_MONOTONIC);
                 if (ts + timeout < n) {
index 5fff7c93a0bf712893d1a7d5f3ef154ab290d546..6c9c132612a64cf326f72081003324ecc2303763 100644 (file)
@@ -48,7 +48,6 @@ static void test_is_symlink(void) {
         assert_se(is_symlink(name_link) == 1);
         assert_se(is_symlink("/a/file/which/does/not/exist/i/guess") < 0);
 
-
         unlink(name);
         unlink(name_link);
 }
index a04c1f9d3ad0d42ffd953272aeff46bb601a15c9..965e2c5028e70d010cd8334e7e283fe40393ce94 100644 (file)
@@ -135,7 +135,6 @@ static void test_strrep(void) {
         assert_se(streq(zero, ""));
 }
 
-
 static void test_strappend(void) {
         _cleanup_free_ char *t1, *t2, *t3, *t4;
 
index fa658eb0566c9bf8a5526c84dd50ad9ac5fa6660..ffe750735570554c58334c99947e7992bf70e749 100644 (file)
@@ -89,7 +89,6 @@ static const char* const input_table_one_empty[] = {
         NULL,
 };
 
-
 static void test_strv_find(void) {
         assert_se(strv_find((char **)input_table_multiple, "three"));
         assert_se(!strv_find((char **)input_table_multiple, "four"));
index 84b20267ad3c7a5e978e574007fe49f0cf77d439..6b72fc90fd2fb00a350172d6868dcea2323d89f5 100644 (file)
@@ -383,7 +383,6 @@ static void test_config_parse_exec(void) {
         c1 = c1->command_next;
         check_execcommand(c1, "/bin/grep", NULL, "\\w+\\K", NULL, false);
 
-
         log_info("/* trailing backslash: \\ */");
         /* backslash is invalid */
         r = config_parse_exec(NULL, "fake", 4, "section", 1,
index 061adc70d8df1d2123201bffab925b42f7f09a68..b45c1529157e261e6572efbc1ff99656ea0726b8 100644 (file)
@@ -412,7 +412,6 @@ static void test_unit_name_escape(void) {
         assert_se(streq(r, "ab\\x2b\\x2dc.a-bc\\x40foo.service"));
 }
 
-
 static void test_u_n_t_one(const char *name, const char *expected, int ret) {
         _cleanup_free_ char *f = NULL;
 
index 5d58de6a871cff91cf02747a4525359020baee68..c058d83c2ed4da1def5fae5fc3a63f301300dfa0 100644 (file)
@@ -35,7 +35,6 @@ static const uint8_t cis_signature[] = {
         0x01, 0x03, 0xD9, 0x01, 0xFF, 0x18, 0x02, 0xDF, 0x01, 0x20
 };
 
-
 void probe_smart_media(int mtd_fd, mtd_info_t* info) {
         int sector_size;
         int block_size;
index bf6b28e8e534b5cfb06551666dd9369d6a594b51..844805de12214b6e4783447a70427697d53e6c07 100644 (file)
@@ -603,7 +603,6 @@ static int check_fill_0x83_prespc3(struct udev *udev,
         return 0;
 }
 
-
 /* Get device identification VPD page */
 static int do_scsi_page83_inquiry(struct udev *udev,
                                   struct scsi_id_device *dev_scsi, int fd,
index 006cdd3501268628ed99abcde9b506d8bb383eec..c30e98dd985b7819a91131cd2b0ca88d455f32aa 100644 (file)
@@ -1740,8 +1740,6 @@ int main(int argc, char *argv[]) {
                                 log_warning_errno(r, "Failed to redirect standard streams to /dev/null: %m");
                 }
 
-
-
                 pid = fork();
                 switch (pid) {
                 case 0:
diff --git a/tools/find-double-newline.sh b/tools/find-double-newline.sh
new file mode 100755 (executable)
index 0000000..c418114
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+# SPDX-License-Identifier: LGPL-2.1+
+
+case "$1" in
+
+        recdiff)
+                if [ "$2" = "" ] ; then
+                        DIR="$PWD/.."
+                else
+                        DIR="$2"
+                fi
+
+                find $DIR -type f \( -name '*.c' -o -name '*.xml' \) -exec $0 diff \{\} \;
+                ;;
+
+        recpatch)
+                if [ "$2" = "" ] ; then
+                        DIR="$PWD/.."
+                else
+                        DIR="$2"
+                fi
+
+                find $DIR -type f \( -name '*.c' -o -name '*.xml' \) -exec $0 patch \{\} \;
+                ;;
+
+        diff)
+                T=`mktemp`
+                sed '/^$/N;/^\n$/D' < "$2" > "$T"
+                diff -u "$2" "$T"
+                rm -f "$T"
+                ;;
+
+        patch)
+                sed -i '/^$/N;/^\n$/D' "$2"
+                ;;
+
+        *)
+                echo "Expected recdiff|recpatch|diff|patch as verb." >&2
+                ;;
+esac