treewide: correct argument comment to 'ret' where applicable

For functions with one return argument prefer 'ret' as argument comment.
This commit is contained in:
Jelle van der Waa
2025-06-04 13:32:24 +02:00
parent d7e986b7f0
commit 1cce9d930a
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -2461,7 +2461,7 @@ static int initialize_runtime(
(void) machine_id_setup(/* root = */ NULL, arg_machine_id,
(first_boot ? MACHINE_ID_SETUP_FORCE_TRANSIENT : 0) |
(arg_machine_id_from_firmware ? MACHINE_ID_SETUP_FORCE_FIRMWARE : 0),
/* ret_machine_id = */ NULL);
/* ret = */ NULL);
(void) hostname_setup(/* really = */ true);
(void) loopback_setup();
+1 -1
View File
@@ -816,7 +816,7 @@ static int add_root_mount(void) {
return 0;
}
r = efi_loader_get_device_part_uuid(/* ret_uuid= */ NULL);
r = efi_loader_get_device_part_uuid(/* ret= */ NULL);
if (r == -ENOENT) {
log_notice("EFI loader partition unknown, not processing %s.\n"
"(The boot loader did not set EFI variable LoaderDevicePartUUID.)",
+1 -1
View File
@@ -17,7 +17,7 @@ static void curl_glue_check_finished(CurlGlue *g) {
assert(g);
/* sd_event_get_exit_code() returns -ENODATA if no exit was scheduled yet */
r = sd_event_get_exit_code(g->event, /* ret_code= */ NULL);
r = sd_event_get_exit_code(g->event, /* ret= */ NULL);
if (r >= 0)
return; /* exit scheduled? Then don't process this anymore */
if (r != -ENODATA)
+1 -1
View File
@@ -935,7 +935,7 @@ int manager_create_session(
}
/* Check if we are already in a logind session, and if so refuse. */
r = manager_get_session_by_pidref(m, leader, /* ret_session= */ NULL);
r = manager_get_session_by_pidref(m, leader, /* ret= */ NULL);
if (r < 0)
return log_debug_errno(
r,
+4 -4
View File
@@ -379,13 +379,13 @@ static int uid_is_available(
if (r > 0)
return false;
r = userdb_by_uid(candidate, /* match= */ NULL, USERDB_AVOID_MULTIPLEXER, /* ret_record= */ NULL);
r = userdb_by_uid(candidate, /* match= */ NULL, USERDB_AVOID_MULTIPLEXER, /* ret= */ NULL);
if (r >= 0)
return false;
if (r != -ESRCH)
return r;
r = groupdb_by_gid(candidate, /* match= */ NULL, USERDB_AVOID_MULTIPLEXER, /* ret_record= */ NULL);
r = groupdb_by_gid(candidate, /* match= */ NULL, USERDB_AVOID_MULTIPLEXER, /* ret= */ NULL);
if (r >= 0)
return false;
if (r != -ESRCH)
@@ -416,13 +416,13 @@ static int name_is_available(
if (!user_name)
return -ENOMEM;
r = userdb_by_name(user_name, /* match= */ NULL, USERDB_AVOID_MULTIPLEXER, /* ret_record= */ NULL);
r = userdb_by_name(user_name, /* match= */ NULL, USERDB_AVOID_MULTIPLEXER, /* ret= */ NULL);
if (r >= 0)
return false;
if (r != -ESRCH)
return r;
r = groupdb_by_name(user_name, /* match= */ NULL, USERDB_AVOID_MULTIPLEXER, /* ret_record= */ NULL);
r = groupdb_by_name(user_name, /* match= */ NULL, USERDB_AVOID_MULTIPLEXER, /* ret= */ NULL);
if (r >= 0)
return false;
if (r != -ESRCH)
+1 -1
View File
@@ -738,7 +738,7 @@ static int userns_destroy_netif(sd_netlink **rtnl, const char *name) {
if (r < 0)
return r;
r = sd_netlink_call(*rtnl, m, /* timeout_usec= */ 0, /* ret_reply= */ NULL);
r = sd_netlink_call(*rtnl, m, /* timeout_usec= */ 0, /* ret= */ NULL);
if (ERRNO_IS_NEG_DEVICE_ABSENT(r)) /* Already gone? */
return 0;
if (r < 0)