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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user