From 346c62f9ca145f976790a11368ef5792045c326d Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Thu, 15 May 2025 15:39:20 +0200 Subject: [PATCH] treewide: correct argument comments --- src/basic/cgroup-util.c | 2 +- src/boot/boot.c | 2 +- src/boot/smbios.c | 2 +- src/bootctl/bootctl-status.c | 2 +- src/fuzz/fuzz-varlink-idl.c | 2 +- src/libsystemd-network/sd-dhcp-server-lease.c | 2 +- src/login/logind-dbus.c | 4 ++-- src/nspawn/nspawn-network.c | 2 +- src/pcrlock/pcrlock.c | 4 ++-- src/ptyfwd/ptyfwd-tool.c | 2 +- src/resolve/test-resolved-packet.c | 2 +- src/shared/bootspec.c | 2 +- src/shared/bus-util.c | 2 +- src/shared/creds-util.c | 2 +- src/shared/factory-reset.c | 2 +- src/vmspawn/vmspawn-util.c | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index cd13b705195..b31e03c6eb5 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -46,7 +46,7 @@ int cg_path_open(const char *controller, const char *path) { _cleanup_free_ char *fs = NULL; int r; - r = cg_get_path(controller, path, /* item=*/ NULL, &fs); + r = cg_get_path(controller, path, /* suffix=*/ NULL, &fs); if (r < 0) return r; diff --git a/src/boot/boot.c b/src/boot/boot.c index 133f16acfe9..c2851e12674 100644 --- a/src/boot/boot.c +++ b/src/boot/boot.c @@ -1571,7 +1571,7 @@ static void config_load_type1_entries( /* offset= */ 0, /* size= */ 0, &content, - /* ret_size= */ NULL); + /* content_size= */ NULL); if (err != EFI_SUCCESS) continue; diff --git a/src/boot/smbios.c b/src/boot/smbios.c index 184aca14ce2..0e2b8812ee5 100644 --- a/src/boot/smbios.c +++ b/src/boot/smbios.c @@ -174,7 +174,7 @@ not_found: bool smbios_in_hypervisor(void) { /* Look up BIOS Information (Type 0). */ - const SmbiosTableType0 *type0 = (const SmbiosTableType0 *) get_smbios_table(0, sizeof(SmbiosTableType0), /* left= */ NULL); + const SmbiosTableType0 *type0 = (const SmbiosTableType0 *) get_smbios_table(0, sizeof(SmbiosTableType0), /* ret_size_left= */ NULL); if (!type0) return false; diff --git a/src/bootctl/bootctl-status.c b/src/bootctl/bootctl-status.c index 081f5d48f0f..1804558bf7d 100644 --- a/src/bootctl/bootctl-status.c +++ b/src/bootctl/bootctl-status.c @@ -50,7 +50,7 @@ static int boot_config_load_and_select( else if (r < 0) log_warning_errno(r, "Failed to determine entries reported by boot loader, ignoring: %m"); else - (void) boot_config_augment_from_loader(config, efi_entries, /* only_auto= */ false); + (void) boot_config_augment_from_loader(config, efi_entries, /* auto_only= */ false); } return boot_config_select_special_entries(config, /* skip_efivars= */ !!arg_root); diff --git a/src/fuzz/fuzz-varlink-idl.c b/src/fuzz/fuzz-varlink-idl.c index 689cdf167bc..8981a363ec1 100644 --- a/src/fuzz/fuzz-varlink-idl.c +++ b/src/fuzz/fuzz-varlink-idl.c @@ -25,7 +25,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { assert_se(str = memdup_suffix0(data, size)); - r = varlink_idl_parse(str, /* line= */ NULL, /* column= */ NULL, &vi); + r = varlink_idl_parse(str, /* ret_line= */ NULL, /* column= */ NULL, &vi); if (r < 0) { log_debug_errno(r, "Failed to parse varlink interface definition: %m"); return 0; diff --git a/src/libsystemd-network/sd-dhcp-server-lease.c b/src/libsystemd-network/sd-dhcp-server-lease.c index 8b4c1012b5c..598ca2329fa 100644 --- a/src/libsystemd-network/sd-dhcp-server-lease.c +++ b/src/libsystemd-network/sd-dhcp-server-lease.c @@ -467,7 +467,7 @@ static int load_leases_file(int dir_fd, const char *path, SavedInfo *ret) { path, /* flags = */ 0, &v, - /* ret_line = */ NULL, + /* reterr_line = */ NULL, /* ret_column = */ NULL); if (r < 0) return r; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index e31165cfd47..19725aa21eb 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1300,7 +1300,7 @@ static int method_create_session(sd_bus_message *message, void *userdata, sd_bus error, uid, leader_pid, - /* pidfd = */ -EBADF, + /* leader_pidfd = */ -EBADF, service, type, class, @@ -4423,7 +4423,7 @@ int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err LIST_FOREACH(sessions_by_user, s, user->sessions) /* Don't propagate user service failures to the client */ - session_jobs_reply(s, id, unit, /* error = */ NULL); + session_jobs_reply(s, id, unit, /* result = */ NULL); user_save(user); break; diff --git a/src/nspawn/nspawn-network.c b/src/nspawn/nspawn-network.c index cb0ebd3225b..f29dfc0f5a3 100644 --- a/src/nspawn/nspawn-network.c +++ b/src/nspawn/nspawn-network.c @@ -497,7 +497,7 @@ static int netns_child_begin(int netns_fd, int *ret_original_netns_fd) { /* Populate new sysfs instance associated with the client netns, to make sd_device usable. */ r = mount_nofollow_verbose(LOG_ERR, "sysfs", "/sys/", "sysfs", - MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV, /* opts = */ NULL); + MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV, /* options = */ NULL); if (r < 0) return log_error_errno(r, "Failed to mount sysfs on /sys/: %m"); diff --git a/src/pcrlock/pcrlock.c b/src/pcrlock/pcrlock.c index 85ba0314c10..5dab5ba3101 100644 --- a/src/pcrlock/pcrlock.c +++ b/src/pcrlock/pcrlock.c @@ -1671,7 +1671,7 @@ static int event_log_add_component_file(EventLog *el, EventLogComponent *compone path, /* flags= */ 0, &j, - /* ret_line= */ NULL, + /* reterr_line= */ NULL, /* ret_column= */ NULL); if (r < 0) { log_warning_errno(r, "Failed to parse component file %s, ignoring: %m", path); @@ -5320,7 +5320,7 @@ static int vl_method_make_policy(sd_varlink *link, sd_json_variant *parameters, if (r != 0) return r; - r = make_policy(p.force, /* recovery_key= */ RECOVERY_PIN_HIDE); + r = make_policy(p.force, /* recovery_pin_mode= */ RECOVERY_PIN_HIDE); if (r < 0) return r; if (r == 0) diff --git a/src/ptyfwd/ptyfwd-tool.c b/src/ptyfwd/ptyfwd-tool.c index a0ae7a2e2a6..62ef96a3ddd 100644 --- a/src/ptyfwd/ptyfwd-tool.c +++ b/src/ptyfwd/ptyfwd-tool.c @@ -171,7 +171,7 @@ static int run(int argc, char *argv[]) { if (r < 0) return log_error_errno(r, "Failed to get event loop: %m"); - pty_fd = openpt_allocate(O_RDWR|O_NOCTTY|O_NONBLOCK|O_CLOEXEC, /*ret_peer=*/ NULL); + pty_fd = openpt_allocate(O_RDWR|O_NOCTTY|O_NONBLOCK|O_CLOEXEC, /*ret_peer_path=*/ NULL); if (pty_fd < 0) return log_error_errno(pty_fd, "Failed to acquire pseudo tty: %m"); diff --git a/src/resolve/test-resolved-packet.c b/src/resolve/test-resolved-packet.c index af1332bb548..b11358a7d7d 100644 --- a/src/resolve/test-resolved-packet.c +++ b/src/resolve/test-resolved-packet.c @@ -209,7 +209,7 @@ TEST(naptr) { assert(streq(joined, twilio_reply_string)); _cleanup_(sd_json_variant_unrefp) sd_json_variant *parsed = NULL; - assert_se(sd_json_parse(twilio_reply_json, /* flags= */ 0, &parsed, /* ret_line= */ NULL, /* ret_column= */ NULL) >= 0); + assert_se(sd_json_parse(twilio_reply_json, /* flags= */ 0, &parsed, /* reterr_line= */ NULL, /* ret_column= */ NULL) >= 0); assert_se(sd_json_variant_equal(parsed, a)); } diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index 8b9411a5c2f..a22bc706232 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -1007,7 +1007,7 @@ static int pe_find_uki_sections( if (found->VirtualSize == 0) continue; - r = pe_read_section_data(fd, found, PE_SECTION_SIZE_MAX, (void**) t->data, /* ret_data= */ NULL); + r = pe_read_section_data(fd, found, PE_SECTION_SIZE_MAX, (void**) t->data, /* ret_size= */ NULL); if (r < 0) return log_error_errno(r, "Failed to load contents of section '%s': %m", t->name); } diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index 82153b1451d..c3b1a01c1a2 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -917,7 +917,7 @@ int bus_get_instance_id(sd_bus *bus, sd_id128_t *ret) { r = sd_bus_call_method(bus, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "GetId", - /* error = */ NULL, &reply, + /* ret_error = */ NULL, &reply, NULL); if (r < 0) return r; diff --git a/src/shared/creds-util.c b/src/shared/creds-util.c index e72df30eb9e..6e0149e92e7 100644 --- a/src/shared/creds-util.c +++ b/src/shared/creds-util.c @@ -1358,7 +1358,7 @@ int decrypt_credential_and_warn( &IOVEC_MAKE(t->policy_hash_and_blob, le32toh(t->blob_size)), /* n_blobs= */ 1, &IOVEC_MAKE(t->policy_hash_and_blob + le32toh(t->blob_size), le32toh(t->policy_hash_size)), - /* n_policy_hash= */ 1, + /* n_known_policy_hash= */ 1, /* srk= */ NULL, &tpm2_key); if (r == -EREMOTE) diff --git a/src/shared/factory-reset.c b/src/shared/factory-reset.c index 7cabb4b0091..82f22d696f8 100644 --- a/src/shared/factory-reset.c +++ b/src/shared/factory-reset.c @@ -40,7 +40,7 @@ static FactoryResetMode factory_reset_mode_efi_variable(void) { return log_debug_errno(r, "Failed to get EFI variable FactoryResetRequest: %m"); _cleanup_(sd_json_variant_unrefp) sd_json_variant *v = NULL; - r = sd_json_parse(req_str, /* flags= */ 0, &v, /* ret_line= */ NULL, /* ret_column= */ NULL); + r = sd_json_parse(req_str, /* flags= */ 0, &v, /* reterr_line= */ NULL, /* ret_column= */ NULL); if (r < 0) { log_debug_errno(r, "EFI variable FactoryResetRequest set to invalid JSON, ignoring: %m"); return FACTORY_RESET_UNSPECIFIED; diff --git a/src/vmspawn/vmspawn-util.c b/src/vmspawn/vmspawn-util.c index 1216f3c5be0..3f65fab2cc5 100644 --- a/src/vmspawn/vmspawn-util.c +++ b/src/vmspawn/vmspawn-util.c @@ -255,7 +255,7 @@ static int load_firmware_data(const char *path, FirmwareData **ret) { path, /* flags= */ 0, &json, - /* ret_line= */ NULL, + /* reterr_line= */ NULL, /* ret_column= */ NULL); if (r < 0) return r; -- 2.47.3