From 9a2dbb26a56bd810dd323c6884f6519747bacf97 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Sun, 25 Nov 2018 15:11:44 +0100 Subject: [PATCH] Fix signed/unsigned comparison warning. --- lib/crypto_backend/crypto_cipher_kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crypto_backend/crypto_cipher_kernel.c b/lib/crypto_backend/crypto_cipher_kernel.c index 0684254e..f8b522a7 100644 --- a/lib/crypto_backend/crypto_cipher_kernel.c +++ b/lib/crypto_backend/crypto_cipher_kernel.c @@ -238,7 +238,7 @@ int crypt_cipher_check(const char *name, const char *mode, else r = snprintf(tmp_salg_name, sizeof(tmp_salg_name), "%s(%s)", real_mode, name); - if (r <= 0 || r > (sizeof(sa.salg_name) - 1)) + if (r <= 0 || r > (int)(sizeof(sa.salg_name) - 1)) return -EINVAL; memcpy(sa.salg_name, tmp_salg_name, sizeof(sa.salg_name));