From b98416e1002bccfa2cf576a290d321fdf1ce254e Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 8 Oct 2021 11:53:23 +0200 Subject: tree-wide: assorted Coccinelle fixes It's that time of year again. --- src/cryptsetup/cryptsetup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cryptsetup/cryptsetup.c') 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."); -- cgit v1.2.1