mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 05:10:03 +01:00
Fix signed/unsigned comparison warning.
This commit is contained in:
@@ -238,7 +238,7 @@ int crypt_cipher_check(const char *name, const char *mode,
|
|||||||
else
|
else
|
||||||
r = snprintf(tmp_salg_name, sizeof(tmp_salg_name), "%s(%s)", real_mode, name);
|
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;
|
return -EINVAL;
|
||||||
|
|
||||||
memcpy(sa.salg_name, tmp_salg_name, sizeof(sa.salg_name));
|
memcpy(sa.salg_name, tmp_salg_name, sizeof(sa.salg_name));
|
||||||
|
|||||||
Reference in New Issue
Block a user