Remove needless double statements.

This commit is contained in:
Ondrej Kozina
2024-08-26 11:56:11 +02:00
committed by Milan Broz
parent 3d89faca18
commit e4d25d18eb
5 changed files with 5 additions and 5 deletions

View File

@@ -624,7 +624,7 @@ static int openssl_argon2(const char *type, const char *password, size_t passwor
ctx = EVP_KDF_CTX_new(argon2); ctx = EVP_KDF_CTX_new(argon2);
if (!ctx) { if (!ctx) {
EVP_KDF_free(argon2); EVP_KDF_free(argon2);
return -EINVAL;; return -EINVAL;
} }
if (EVP_KDF_CTX_set_params(ctx, params) != 1) { if (EVP_KDF_CTX_set_params(ctx, params) != 1) {

View File

@@ -145,7 +145,7 @@ int LOOPAES_parse_keyfile(struct crypt_device *cd,
key_lengths[0] = 0; key_lengths[0] = 0;
while (offset < buffer_len && key_index < LOOPAES_KEYS_MAX) { while (offset < buffer_len && key_index < LOOPAES_KEYS_MAX) {
keys[key_index] = &buffer[offset]; keys[key_index] = &buffer[offset];
key_lengths[key_index] = 0;; key_lengths[key_index] = 0;
while (offset < buffer_len && buffer[offset]) { while (offset < buffer_len && buffer[offset]) {
offset++; offset++;
key_lengths[key_index]++; key_lengths[key_index]++;

View File

@@ -4853,7 +4853,7 @@ int create_or_reload_device(struct crypt_device *cd, const char *name,
if (dmd->flags & CRYPT_ACTIVATE_REFRESH) { if (dmd->flags & CRYPT_ACTIVATE_REFRESH) {
/* Refresh and recalculate means increasing dm-integrity device */ /* Refresh and recalculate means increasing dm-integrity device */
if (tgt->type == DM_INTEGRITY && dmd->flags & CRYPT_ACTIVATE_RECALCULATE) if (tgt->type == DM_INTEGRITY && dmd->flags & CRYPT_ACTIVATE_RECALCULATE)
dmflags = DM_SUSPEND_SKIP_LOCKFS | DM_SUSPEND_NOFLUSH;; dmflags = DM_SUSPEND_SKIP_LOCKFS | DM_SUSPEND_NOFLUSH;
r = _reload_device(cd, name, dmd, dmflags); r = _reload_device(cd, name, dmd, dmflags);
} else { } else {
if (tgt->type == DM_CRYPT || tgt->type == DM_LINEAR) { if (tgt->type == DM_CRYPT || tgt->type == DM_LINEAR) {

View File

@@ -170,7 +170,7 @@ int blk_is_partition(struct blkid_handle *h)
int blk_is_superblock(struct blkid_handle *h) int blk_is_superblock(struct blkid_handle *h)
{ {
return blkid_probe_has_value(h->pr, "TYPE");; return blkid_probe_has_value(h->pr, "TYPE");
} }
const char *blk_get_partition_type(struct blkid_handle *h) const char *blk_get_partition_type(struct blkid_handle *h)

View File

@@ -1694,7 +1694,7 @@ static void VerityTest(void)
OK_(crypt_activate_by_volume_key(cd, NULL, root_hash, 32, 0)); OK_(crypt_activate_by_volume_key(cd, NULL, root_hash, 32, 0));
OK_(crypt_set_data_device(cd, DEVICE_1)); OK_(crypt_set_data_device(cd, DEVICE_1));
FAIL_(crypt_activate_by_volume_key(cd, NULL, root_hash, 32, 0), "Data corrupted");; FAIL_(crypt_activate_by_volume_key(cd, NULL, root_hash, 32, 0), "Data corrupted");
OK_(crypt_set_data_device(cd, DEVICE_EMPTY)); OK_(crypt_set_data_device(cd, DEVICE_EMPTY));
if (crypt_activate_by_volume_key(cd, CDEVICE_1, root_hash, 32, if (crypt_activate_by_volume_key(cd, CDEVICE_1, root_hash, 32,