diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-10-08 11:53:23 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-10-08 15:03:27 +0200 |
commit | b98416e1002bccfa2cf576a290d321fdf1ce254e (patch) | |
tree | 73137c243bf338c8403be7eef37430bd0ecbae32 /src/cryptsetup/cryptsetup.c | |
parent | c17e8ce9ecc46e3dc9774a131f1bb0afeddb2000 (diff) | |
download | systemd-b98416e1002bccfa2cf576a290d321fdf1ce254e.tar.gz |
tree-wide: assorted Coccinelle fixes
It's that time of year again.
Diffstat (limited to 'src/cryptsetup/cryptsetup.c')
-rw-r--r-- | src/cryptsetup/cryptsetup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 74ca1cb262..2c5b0e8f7d 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -1004,7 +1004,7 @@ static int attach_luks2_by_pkcs11( bool headless, uint32_t flags) { - int r = -ENOTSUP; + int r = -EOPNOTSUPP; #if HAVE_LIBCRYPTSETUP_PLUGINS if (!crypt_get_type(cd) || strcmp(crypt_get_type(cd), CRYPT_LUKS2)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Automatic PKCS#11 metadata requires LUKS2 device."); @@ -1198,7 +1198,7 @@ static int attach_luks2_by_tpm2( .device = arg_tpm2_device }; - if (crypt_token_external_path() == NULL) + if (!crypt_token_external_path()) return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Libcryptsetup has external plugins support disabled."); |