parse-util: rename trivial argument for parse_pid()

The function parse_pid() trivially returns pid, hence it is not
necessary to name the argument for storing result as 'ret_pid'.
This commit is contained in:
Yu Watanabe
2026-02-03 21:43:17 +09:00
parent 7e81423fb8
commit dd839b1463
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -63,7 +63,7 @@ int parse_tristate_full(const char *v, const char *third, int *ret) {
return 0;
}
int parse_pid(const char *s, pid_t* ret_pid) {
int parse_pid(const char *s, pid_t *ret) {
unsigned long ul = 0;
pid_t pid;
int r;
@@ -82,8 +82,8 @@ int parse_pid(const char *s, pid_t* ret_pid) {
if (!pid_is_valid(pid))
return -ERANGE;
if (ret_pid)
*ret_pid = pid;
if (ret)
*ret = pid;
return 0;
}
+1 -1
View File
@@ -10,7 +10,7 @@ int parse_tristate_full(const char *v, const char *third, int *ret);
static inline int parse_tristate(const char *v, int *ret) {
return parse_tristate_full(v, NULL, ret);
}
int parse_pid(const char *s, pid_t* ret_pid);
int parse_pid(const char *s, pid_t *ret);
int parse_mode(const char *s, mode_t *ret);
int parse_ifindex(const char *s);
int parse_mtu(int family, const char *s, uint32_t *ret);