1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

proc-cmdline: rename variable

This commit is contained in:
Yu Watanabe 2023-03-23 04:32:23 +09:00
parent a175b98171
commit b3e9a267ce

View File

@ -174,7 +174,7 @@ bool proc_cmdline_key_streq(const char *x, const char *y) {
} }
static int cmdline_get_key(const char *line, const char *key, ProcCmdlineFlags flags, char **ret_value) { static int cmdline_get_key(const char *line, const char *key, ProcCmdlineFlags flags, char **ret_value) {
_cleanup_free_ char *ret = NULL; _cleanup_free_ char *v = NULL;
bool found = false; bool found = false;
const char *p; const char *p;
int r; int r;
@ -200,7 +200,7 @@ static int cmdline_get_key(const char *line, const char *key, ProcCmdlineFlags f
continue; continue;
if (*e == '=') { if (*e == '=') {
r = free_and_strdup(&ret, e+1); r = free_and_strdup(&v, e+1);
if (r < 0) if (r < 0)
return r; return r;
@ -218,7 +218,7 @@ static int cmdline_get_key(const char *line, const char *key, ProcCmdlineFlags f
} }
if (ret_value) if (ret_value)
*ret_value = TAKE_PTR(ret); *ret_value = TAKE_PTR(v);
return found; return found;
} }