mirror of
https://github.com/systemd/systemd
synced 2024-07-21 18:24:38 +00:00
creds: trivial coding style fixes
As per: https://github.com/systemd/systemd/pull/23170#pullrequestreview-959233817
This commit is contained in:
parent
0ba05e754c
commit
07a442ef8b
|
@ -61,9 +61,9 @@ static const char* transcode_mode_table[_TRANSCODE_MAX] = {
|
||||||
DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(transcode_mode, TranscodeMode);
|
DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(transcode_mode, TranscodeMode);
|
||||||
|
|
||||||
static int open_credential_directory(
|
static int open_credential_directory(
|
||||||
|
bool encrypted,
|
||||||
DIR **ret_dir,
|
DIR **ret_dir,
|
||||||
const char **ret_prefix,
|
const char **ret_prefix) {
|
||||||
bool encrypted) {
|
|
||||||
|
|
||||||
const char *p;
|
const char *p;
|
||||||
DIR *d;
|
DIR *d;
|
||||||
|
@ -120,7 +120,7 @@ static int add_credentials_to_table(Table *t, bool encrypted) {
|
||||||
|
|
||||||
assert(t);
|
assert(t);
|
||||||
|
|
||||||
r = open_credential_directory(&d, &prefix, encrypted);
|
r = open_credential_directory(encrypted, &d, &prefix);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
if (!d)
|
if (!d)
|
||||||
|
@ -377,10 +377,10 @@ static int verb_cat(int argc, char **argv, void *userdata) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Look both in regular and in encrypted credentials */
|
/* Look both in regular and in encrypted credentials */
|
||||||
for (encrypted = 0; encrypted < 2; encrypted ++) {
|
for (encrypted = 0; encrypted < 2; encrypted++) {
|
||||||
_cleanup_(closedirp) DIR *d = NULL;
|
_cleanup_(closedirp) DIR *d = NULL;
|
||||||
|
|
||||||
r = open_credential_directory(&d, NULL, encrypted);
|
r = open_credential_directory(encrypted, &d, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to open credentials directory: %m");
|
return log_error_errno(r, "Failed to open credentials directory: %m");
|
||||||
if (!d) /* Not set */
|
if (!d) /* Not set */
|
||||||
|
|
Loading…
Reference in a new issue