From cd96f11f946868f1339ef2d6572659f42fe084ac Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 7 Oct 2024 12:47:57 +0900 Subject: [PATCH] tree-wide: drop doubled empty lines (cherry picked from commit f769518c9ac6ca6bef063092ddc0e1718a67f540) Resolves: RHEL-49810 --- hwdb.d/60-keyboard.hwdb | 2 -- src/analyze/analyze-plot.c | 1 - src/basic/confidential-virt.c | 1 - src/basic/filesystems.c | 1 - src/basic/recurse-dir.c | 1 - src/basic/xattr-util.h | 1 - src/core/load-fragment.c | 1 - src/core/socket.c | 1 - src/cryptenroll/cryptenroll.c | 1 - src/home/homectl.c | 1 - src/home/homed-manager.c | 1 - src/home/homework-fscrypt.c | 1 - src/hostname/hostnamectl.c | 1 - src/integritysetup/integrity-util.c | 1 - src/integritysetup/integrity-util.h | 1 - src/libsystemd-network/sd-dhcp-client.c | 1 - src/libsystemd/sd-bus/bus-message.c | 1 - src/libsystemd/sd-event/sd-event.c | 1 - src/network/netdev/ipoib.c | 1 - src/network/networkd-neighbor.c | 1 - src/nss-systemd/userdb-glue.c | 1 - src/partition/repart.c | 1 - src/resolve/resolved-dns-answer.c | 1 - src/resolve/resolved-dns-question.c | 2 -- src/resolve/resolved-dns-rr.c | 1 - src/resolve/resolved-mdns.c | 1 - src/resolve/test-dnssec.c | 1 - src/shared/bpf-compat.h | 1 - src/shared/bpf-program.c | 1 - src/shared/creds-util.c | 1 - src/shared/id128-print.c | 1 - src/shared/userdb.c | 1 - src/systemctl/systemctl-util.c | 1 - src/sysupdate/sysupdate.c | 1 - src/test/test-barrier.c | 1 - src/test/test-bpf-devices.c | 1 - src/test/test-execute.c | 1 - src/test/test-install-root.c | 1 - 38 files changed, 40 deletions(-) diff --git a/hwdb.d/60-keyboard.hwdb b/hwdb.d/60-keyboard.hwdb index 798529cd10..4d5f6b4beb 100644 --- a/hwdb.d/60-keyboard.hwdb +++ b/hwdb.d/60-keyboard.hwdb @@ -1435,7 +1435,6 @@ evdev:input:b0003v046DpC309* KEYBOARD_KEY_c01b6=images # My Pictures (F11) KEYBOARD_KEY_c01b7=audio # My Music (F12) - ########################################################### # Maxdata ########################################################### @@ -1920,7 +1919,6 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:sku*SCAI*:* KEYBOARD_KEY_a9=!unknown # Fn+F12 Fn lock Off - handled by hardware KEYBOARD_KEY_8f=!battery # Notification that battery has met charge control end threshold - ########################################################### # SONY ########################################################### diff --git a/src/analyze/analyze-plot.c b/src/analyze/analyze-plot.c index 8aca691b3d..151d715c06 100644 --- a/src/analyze/analyze-plot.c +++ b/src/analyze/analyze-plot.c @@ -28,7 +28,6 @@ svg("\n"); \ } while (false) - typedef struct HostInfo { char *hostname; char *kernel_name; diff --git a/src/basic/confidential-virt.c b/src/basic/confidential-virt.c index 0929e0e745..30ecd20317 100644 --- a/src/basic/confidential-virt.c +++ b/src/basic/confidential-virt.c @@ -16,7 +16,6 @@ #include "string-table.h" #include "utf8.h" - #if defined(__x86_64__) static void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) { diff --git a/src/basic/filesystems.c b/src/basic/filesystems.c index 0f71f8e07c..fd6007cd8b 100644 --- a/src/basic/filesystems.c +++ b/src/basic/filesystems.c @@ -12,7 +12,6 @@ const char *fs_type_to_string(statfs_f_type_t magic) { return NULL; } - int fs_type_from_string(const char *name, const statfs_f_type_t **ret) { const struct FilesystemMagic *fs_magic; diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c index d16ca98f67..8b9f3df7d5 100644 --- a/src/basic/recurse-dir.c +++ b/src/basic/recurse-dir.c @@ -420,7 +420,6 @@ int recurse_dir( statx_mask != 0 ? &sx : NULL, /* only pass sx if user asked for it */ userdata); - if (r == RECURSE_DIR_LEAVE_DIRECTORY) break; if (!IN_SET(r, RECURSE_DIR_SKIP_ENTRY, RECURSE_DIR_CONTINUE)) diff --git a/src/basic/xattr-util.h b/src/basic/xattr-util.h index 0eb745a7a3..5c4bc02bc8 100644 --- a/src/basic/xattr-util.h +++ b/src/basic/xattr-util.h @@ -25,7 +25,6 @@ static inline int fd_getcrtime(int fd, usec_t *ret) { return fd_getcrtime_at(fd, NULL, 0, ret); } - int listxattr_at_malloc(int fd, const char *path, int flags, char **ret); static inline int listxattr_malloc(const char *path, char **ret) { return listxattr_at_malloc(AT_FDCWD, path, AT_SYMLINK_FOLLOW, ret); diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 0b5c8acee4..26f42a9cf6 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -170,7 +170,6 @@ int config_parse_cpu_shares( assert(lvalue); assert(rvalue); - log_syntax(unit, LOG_WARNING, filename, line, 0, "Unit uses %s=; please use CPUWeight= instead. Support for %s= will be removed soon.", lvalue, lvalue); diff --git a/src/core/socket.c b/src/core/socket.c index 2a8aa54f7f..65b07e70fd 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -641,7 +641,6 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) { "%sFlushPending: %s\n", prefix, yes_no(s->flush_pending)); - if (s->priority >= 0) fprintf(f, "%sPriority: %i\n", diff --git a/src/cryptenroll/cryptenroll.c b/src/cryptenroll/cryptenroll.c index d2fffdad24..3f57b125ea 100644 --- a/src/cryptenroll/cryptenroll.c +++ b/src/cryptenroll/cryptenroll.c @@ -360,7 +360,6 @@ static int parse_argv(int argc, char *argv[]) { return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Multiple operations specified at once, refusing."); - r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_tpm2_device_key); if (r < 0) return r; diff --git a/src/home/homectl.c b/src/home/homectl.c index 87a1c6883f..8534953f2c 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -158,7 +158,6 @@ static int list_homes(int argc, char *argv[], void *userdata) { if (r < 0) return table_log_add_error(r); - r = table_add_cell(table, &cell, TABLE_STRING, state); if (r < 0) return table_log_add_error(r); diff --git a/src/home/homed-manager.c b/src/home/homed-manager.c index 61ef979049..cd8bee9145 100644 --- a/src/home/homed-manager.c +++ b/src/home/homed-manager.c @@ -1950,7 +1950,6 @@ static int manager_rebalance_calculate(Manager *m) { 1 * USEC_PER_MINUTE, 15 * USEC_PER_MINUTE); - log_debug("Rebalancing interval set to %s.", FORMAT_TIMESPAN(m->rebalance_interval_usec, USEC_PER_MSEC)); /* Let's suppress small resizes, growing/shrinking file systems isn't free after all */ diff --git a/src/home/homework-fscrypt.c b/src/home/homework-fscrypt.c index 455a4c88fc..96cf901124 100644 --- a/src/home/homework-fscrypt.c +++ b/src/home/homework-fscrypt.c @@ -94,7 +94,6 @@ static int fscrypt_slot_try_one( const uint8_t match_key_descriptor[static FS_KEY_DESCRIPTOR_SIZE], void **ret_decrypted, size_t *ret_decrypted_size) { - _cleanup_(EVP_CIPHER_CTX_freep) EVP_CIPHER_CTX *context = NULL; _cleanup_(erase_and_freep) void *decrypted = NULL; uint8_t key_descriptor[FS_KEY_DESCRIPTOR_SIZE]; diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c index bb014973fb..924684685c 100644 --- a/src/hostname/hostnamectl.c +++ b/src/hostname/hostnamectl.c @@ -398,7 +398,6 @@ static int show_status(int argc, char **argv, void *userdata) { return show_all_names(bus); } - static int set_simple_string_internal(sd_bus *bus, sd_bus_error *error, const char *target, const char *method, const char *value) { _cleanup_(sd_bus_error_free) sd_bus_error e = SD_BUS_ERROR_NULL; int r; diff --git a/src/integritysetup/integrity-util.c b/src/integritysetup/integrity-util.c index c2d2f950de..410133b377 100644 --- a/src/integritysetup/integrity-util.c +++ b/src/integritysetup/integrity-util.c @@ -6,7 +6,6 @@ #include "path-util.h" #include "percent-util.h" - static int supported_integrity_algorithm(char *user_supplied) { if (!STR_IN_SET(user_supplied, "crc32", "crc32c", "sha1", "sha256", "hmac-sha256")) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Unsupported integrity algorithm (%s)", user_supplied); diff --git a/src/integritysetup/integrity-util.h b/src/integritysetup/integrity-util.h index b27975c7db..359d2556a4 100644 --- a/src/integritysetup/integrity-util.h +++ b/src/integritysetup/integrity-util.h @@ -6,7 +6,6 @@ #include "cryptsetup-util.h" #include "time-util.h" - int parse_integrity_options( const char *options, uint32_t *ret_activate_flags, diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index a106f7f3b8..698427ec17 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -1003,7 +1003,6 @@ static int client_append_common_discover_request_options(sd_dhcp_client *client, return r; } - return 0; } diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index d9c52d64c0..213b276e33 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -4118,7 +4118,6 @@ static int message_parse_fields(sd_bus_message *m) { if (m->reply_cookie != 0) return -EBADMSG; - if (!streq(signature, "u")) return -EBADMSG; diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 165abfc314..f15115c57f 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1553,7 +1553,6 @@ _public_ int sd_event_add_child_pidfd( sd_event_child_handler_t callback, void *userdata) { - _cleanup_(source_freep) sd_event_source *s = NULL; pid_t pid; int r; diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c index 5dd9286d57..a584d788fc 100644 --- a/src/network/netdev/ipoib.c +++ b/src/network/netdev/ipoib.c @@ -149,7 +149,6 @@ int config_parse_ipoib_pkey( return 0; } - const NetDevVTable ipoib_vtable = { .object_size = sizeof(IPoIB), .sections = NETDEV_COMMON_SECTIONS "IPoIB\0", diff --git a/src/network/networkd-neighbor.c b/src/network/networkd-neighbor.c index f0f78b9c4a..94b18367ae 100644 --- a/src/network/networkd-neighbor.c +++ b/src/network/networkd-neighbor.c @@ -593,7 +593,6 @@ void network_drop_invalid_neighbors(Network *network) { neighbor_free(neighbor); } - int config_parse_neighbor_address( const char *unit, const char *filename, diff --git a/src/nss-systemd/userdb-glue.c b/src/nss-systemd/userdb-glue.c index c69667d660..3d49ad4755 100644 --- a/src/nss-systemd/userdb-glue.c +++ b/src/nss-systemd/userdb-glue.c @@ -346,7 +346,6 @@ enum nss_status userdb_getgrgid( size_t buflen, int *errnop) { - _cleanup_(group_record_unrefp) GroupRecord *g = NULL; _cleanup_strv_free_ char **members = NULL; bool from_nss; diff --git a/src/partition/repart.c b/src/partition/repart.c index 553d92e730..eeb31a6160 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -2669,7 +2669,6 @@ static int context_dump(Context *context, const char *node, bool late) { return 0; } - static bool context_changed(const Context *context) { assert(context); diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c index 3d42b0d000..d03b836d35 100644 --- a/src/resolve/resolved-dns-answer.c +++ b/src/resolve/resolved-dns-answer.c @@ -651,7 +651,6 @@ void dns_answer_order_by_scope(DnsAnswer *a, bool prefer_link_local) { if (dns_resource_record_is_link_local_address(item->rr) != prefer_link_local) *p++ = dns_answer_item_ref(item); - assert((size_t) (p - items) == n); ordered_set_clear(a->items); diff --git a/src/resolve/resolved-dns-question.c b/src/resolve/resolved-dns-question.c index 8f5ebb4590..947cfa2795 100644 --- a/src/resolve/resolved-dns-question.c +++ b/src/resolve/resolved-dns-question.c @@ -72,7 +72,6 @@ int dns_question_add(DnsQuestion *q, DnsResourceKey *key, DnsQuestionFlags flags if (!q) return -ENOSPC; - DNS_QUESTION_FOREACH_ITEM(item, q) { r = dns_resource_key_equal(item->key, key); if (r < 0) @@ -184,7 +183,6 @@ int dns_question_contains_key(DnsQuestion *q, const DnsResourceKey *k) { if (!q) return 0; - for (j = 0; j < q->n_keys; j++) { r = dns_resource_key_equal(q->items[j].key, k); if (r != 0) diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c index d47cdbbd8e..ce40bb749e 100644 --- a/src/resolve/resolved-dns-rr.c +++ b/src/resolve/resolved-dns-rr.c @@ -2019,7 +2019,6 @@ int dns_resource_record_to_json(DnsResourceRecord *rr, JsonVariant **ret) { JSON_BUILD_PAIR("algorithm", JSON_BUILD_UNSIGNED(rr->dnskey.algorithm)), JSON_BUILD_PAIR("dnskey", JSON_BUILD_BASE64(rr->dnskey.key, rr->dnskey.key_size)))); - case DNS_TYPE_RRSIG: return json_build(ret, JSON_BUILD_OBJECT( diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c index 8d51017b5d..a8f4952a40 100644 --- a/src/resolve/resolved-mdns.c +++ b/src/resolve/resolved-mdns.c @@ -236,7 +236,6 @@ static bool sender_on_local_subnet(DnsScope *s, DnsPacket *p) { return false; } - static int mdns_scope_process_query(DnsScope *s, DnsPacket *p) { _cleanup_(dns_answer_unrefp) DnsAnswer *full_answer = NULL; _cleanup_(dns_packet_unrefp) DnsPacket *reply = NULL; diff --git a/src/resolve/test-dnssec.c b/src/resolve/test-dnssec.c index d325b533ea..6b0ab66ae7 100644 --- a/src/resolve/test-dnssec.c +++ b/src/resolve/test-dnssec.c @@ -387,7 +387,6 @@ TEST(dnssec_verify_rfc6605_example2) { 0xab, 0xf0, 0x8f, 0xe6, 0x95, 0x53, 0x60, 0x17, 0xa5, 0xbf, 0xa9, 0x32, 0x37, 0xee, 0x6e, 0x34, }; - _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *dnskey = NULL, *ds = NULL, *a = NULL, *rrsig = NULL; _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL; diff --git a/src/shared/bpf-compat.h b/src/shared/bpf-compat.h index 9ccb7d8205..20725e600b 100644 --- a/src/shared/bpf-compat.h +++ b/src/shared/bpf-compat.h @@ -15,7 +15,6 @@ * compile time is that we can then load either the old or the new symbols at runtime * regardless of the version we were compiled with */ - /* declare the struct for libbpf <= 0.6.0 -- it causes no harm on newer versions */ struct bpf_map_create_opts; diff --git a/src/shared/bpf-program.c b/src/shared/bpf-program.c index 31fa4448b0..7f8ab1de2c 100644 --- a/src/shared/bpf-program.c +++ b/src/shared/bpf-program.c @@ -138,7 +138,6 @@ int bpf_program_new_from_bpffs_path(const char *path, BPFProgram **ret) { return 0; } - int bpf_program_add_instructions(BPFProgram *p, const struct bpf_insn *instructions, size_t count) { assert(p); diff --git a/src/shared/creds-util.c b/src/shared/creds-util.c index 027ad96640..3937cfd751 100644 --- a/src/shared/creds-util.c +++ b/src/shared/creds-util.c @@ -319,7 +319,6 @@ int get_credential_host_secret(CredentialSecretFlags flags, void **ret, size_t * return log_debug_errno(errno, "Failed to open %s/%s: %m", dirname, filename); - r = make_credential_host_secret(dfd, machine_id, flags, dirname, filename, ret, ret_size); if (r == -EEXIST) { log_debug_errno(r, "Credential secret %s/%s appeared while we were creating it, rereading.", diff --git a/src/shared/id128-print.c b/src/shared/id128-print.c index f232767adf..1a74b75573 100644 --- a/src/shared/id128-print.c +++ b/src/shared/id128-print.c @@ -47,7 +47,6 @@ int id128_pretty_print_sample(const char *name, sd_id128_t id) { return 0; } - int id128_pretty_print(sd_id128_t id, Id128PrettyPrintMode mode) { assert(mode >= 0); assert(mode < _ID128_PRETTY_PRINT_MODE_MAX); diff --git a/src/shared/userdb.c b/src/shared/userdb.c index de7eef687e..3f64ec8942 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c @@ -918,7 +918,6 @@ int groupdb_by_name(const char *name, UserDBFlags flags, GroupRecord **ret) { return r; } - if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && !(iterator && iterator->nss_covered)) { r = userdb_iterator_block_nss_systemd(iterator); if (r >= 0) { diff --git a/src/systemctl/systemctl-util.c b/src/systemctl/systemctl-util.c index b333850bec..1f8fda8ac1 100644 --- a/src/systemctl/systemctl-util.c +++ b/src/systemctl/systemctl-util.c @@ -658,7 +658,6 @@ int unit_exists(LookupPaths *lp, const char *unit) { return !streq_ptr(info.load_state, "not-found") || !streq_ptr(info.active_state, "inactive"); } - int append_unit_dependencies(sd_bus *bus, char **names, char ***ret) { _cleanup_strv_free_ char **with_deps = NULL; diff --git a/src/sysupdate/sysupdate.c b/src/sysupdate/sysupdate.c index 944ac41a41..9faa53dce7 100644 --- a/src/sysupdate/sysupdate.c +++ b/src/sysupdate/sysupdate.c @@ -499,7 +499,6 @@ static int context_show_version(Context *c, const char *version) { FLAGS_SET(us->flags, UPDATE_INSTALLED|UPDATE_PROTECTED) ? ansi_highlight() : "", yes_no(FLAGS_SET(us->flags, UPDATE_INSTALLED|UPDATE_PROTECTED)), ansi_normal(), us->flags & UPDATE_OBSOLETE ? ansi_highlight_red() : "", yes_no(us->flags & UPDATE_OBSOLETE), ansi_normal()); - t = table_new("type", "path", "ptuuid", "ptflags", "mtime", "mode", "size", "tries-done", "tries-left", "noauto", "ro", "growfs", "sha256"); if (!t) return log_oom(); diff --git a/src/test/test-barrier.c b/src/test/test-barrier.c index 50ceb3a355..ba06c1710d 100644 --- a/src/test/test-barrier.c +++ b/src/test/test-barrier.c @@ -422,7 +422,6 @@ TEST_BARRIER(barrier_pending_exit, }), TEST_BARRIER_WAIT_SUCCESS(pid2)); - static int intro(void) { if (!slow_tests_enabled()) return log_tests_skipped("slow tests are disabled"); diff --git a/src/test/test-bpf-devices.c b/src/test/test-bpf-devices.c index e175483734..2b90ffa7b8 100644 --- a/src/test/test-bpf-devices.c +++ b/src/test/test-bpf-devices.c @@ -248,7 +248,6 @@ static void test_policy_empty(bool add_mismatched, const char *cgroup_path, BPFP assert_se(wrong == 0); } - int main(int argc, char *argv[]) { _cleanup_free_ char *cgroup = NULL, *parent = NULL; _cleanup_(rmdir_and_freep) char *controller_path = NULL; diff --git a/src/test/test-execute.c b/src/test/test-execute.c index e6bd21b6b9..1f838e5c91 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -332,7 +332,6 @@ static void test_exec_execsearchpath_environment_files(Manager *m) { (void) unlink("/tmp/test-exec_environmentfile.conf"); - r = write_string_file("/tmp/test-exec_execsearchpath_environmentfile-set.conf", path_set, WRITE_STRING_FILE_CREATE); assert_se(r == 0); diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c index 2868ab07b2..1002818227 100644 --- a/src/test/test-install-root.c +++ b/src/test/test-install-root.c @@ -1271,5 +1271,4 @@ static int intro(void) { return EXIT_SUCCESS; } - DEFINE_TEST_MAIN_WITH_INTRO(LOG_INFO, intro);