mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
cryptsetup: use unabbrieviated variable names
Now that "ret_" has been added to the output variables, we can name the internal variables without artificial abbrevs.
This commit is contained in:
parent
1be8044b5b
commit
5d2100dc4c
@ -47,7 +47,7 @@ STATIC_DESTRUCTOR_REGISTER(arg_default_options, freep);
|
||||
STATIC_DESTRUCTOR_REGISTER(arg_default_keyfile, freep);
|
||||
|
||||
static int split_keyspec(const char *keyspec, char **ret_keyfile, char **ret_keydev) {
|
||||
_cleanup_free_ char *kfile = NULL, *kdev = NULL;
|
||||
_cleanup_free_ char *keyfile = NULL, *keydev = NULL;
|
||||
const char *c;
|
||||
|
||||
assert(keyspec);
|
||||
@ -56,20 +56,20 @@ static int split_keyspec(const char *keyspec, char **ret_keyfile, char **ret_key
|
||||
|
||||
c = strrchr(keyspec, ':');
|
||||
if (c) {
|
||||
kfile = strndup(keyspec, c-keyspec);
|
||||
kdev = strdup(c + 1);
|
||||
if (!kfile || !kdev)
|
||||
keyfile = strndup(keyspec, c-keyspec);
|
||||
keydev = strdup(c + 1);
|
||||
if (!keyfile || !keydev)
|
||||
return log_oom();
|
||||
} else {
|
||||
/* No keydev specified */
|
||||
kfile = strdup(keyspec);
|
||||
kdev = NULL;
|
||||
if (!kfile)
|
||||
keyfile = strdup(keyspec);
|
||||
keydev = NULL;
|
||||
if (!keyfile)
|
||||
return log_oom();
|
||||
}
|
||||
|
||||
*ret_keyfile = TAKE_PTR(kfile);
|
||||
*ret_keydev = TAKE_PTR(kdev);
|
||||
*ret_keyfile = TAKE_PTR(keyfile);
|
||||
*ret_keydev = TAKE_PTR(keydev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user