diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-07-09 13:15:01 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2021-07-09 20:54:22 +0100 |
commit | 2f0927626abf6ac6c99a42c1c7fa159063bfc8ee (patch) | |
tree | 5ae1a49a9023f7e4e00177f390c9c4a25b06858e /src/creds | |
parent | 0de0ba573b9c0070b0280300c42111a5b0d7e655 (diff) | |
download | systemd-2f0927626abf6ac6c99a42c1c7fa159063bfc8ee.tar.gz |
tree-wide: coccinelle fixes
Yet another batch of Coccinelle fixes.
Diffstat (limited to 'src/creds')
-rw-r--r-- | src/creds/creds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/creds/creds.c b/src/creds/creds.c index 50de685cd4..b58faf6589 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -362,7 +362,7 @@ static int verb_encrypt(int argc, char **argv, void *userdata) { assert(argc == 3); - input_path = (isempty(argv[1]) || streq(argv[1], "-")) ? NULL : argv[1]; + input_path = empty_or_dash(argv[1]) ? NULL : argv[1]; if (input_path) r = read_full_file_full(AT_FDCWD, input_path, UINT64_MAX, CREDENTIAL_SIZE_MAX, READ_FULL_FILE_SECURE|READ_FULL_FILE_FAIL_WHEN_LARGER, NULL, &plaintext, &plaintext_size); @@ -373,7 +373,7 @@ static int verb_encrypt(int argc, char **argv, void *userdata) { if (r < 0) return log_error_errno(r, "Failed to read plaintext: %m"); - output_path = (isempty(argv[2]) || streq(argv[2], "-")) ? NULL : argv[2]; + output_path = empty_or_dash(argv[2]) ? NULL : argv[2]; if (arg_name_any) name = NULL; @@ -455,7 +455,7 @@ static int verb_decrypt(int argc, char **argv, void *userdata) { assert(IN_SET(argc, 2, 3)); - input_path = (isempty(argv[1]) || streq(argv[1], "-")) ? NULL : argv[1]; + input_path = empty_or_dash(argv[1]) ? NULL : argv[1]; if (input_path) r = read_full_file_full(AT_FDCWD, argv[1], UINT64_MAX, CREDENTIAL_ENCRYPTED_SIZE_MAX, READ_FULL_FILE_UNBASE64|READ_FULL_FILE_FAIL_WHEN_LARGER, NULL, &input, &input_size); |