From e4d25d18ebe3ec9b518f68c4084d90eb779041e8 Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Mon, 26 Aug 2024 11:56:11 +0200 Subject: [PATCH] Remove needless double statements. --- lib/crypto_backend/crypto_openssl.c | 2 +- lib/loopaes/loopaes.c | 2 +- lib/setup.c | 2 +- lib/utils_blkid.c | 2 +- tests/api-test.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/crypto_backend/crypto_openssl.c b/lib/crypto_backend/crypto_openssl.c index cd694a83b..9f1be9e00 100644 --- a/lib/crypto_backend/crypto_openssl.c +++ b/lib/crypto_backend/crypto_openssl.c @@ -624,7 +624,7 @@ static int openssl_argon2(const char *type, const char *password, size_t passwor ctx = EVP_KDF_CTX_new(argon2); if (!ctx) { EVP_KDF_free(argon2); - return -EINVAL;; + return -EINVAL; } if (EVP_KDF_CTX_set_params(ctx, params) != 1) { diff --git a/lib/loopaes/loopaes.c b/lib/loopaes/loopaes.c index 4a35f214e..8aec3de39 100644 --- a/lib/loopaes/loopaes.c +++ b/lib/loopaes/loopaes.c @@ -145,7 +145,7 @@ int LOOPAES_parse_keyfile(struct crypt_device *cd, key_lengths[0] = 0; while (offset < buffer_len && key_index < LOOPAES_KEYS_MAX) { keys[key_index] = &buffer[offset]; - key_lengths[key_index] = 0;; + key_lengths[key_index] = 0; while (offset < buffer_len && buffer[offset]) { offset++; key_lengths[key_index]++; diff --git a/lib/setup.c b/lib/setup.c index cdf468e1d..741def381 100644 --- a/lib/setup.c +++ b/lib/setup.c @@ -4853,7 +4853,7 @@ int create_or_reload_device(struct crypt_device *cd, const char *name, if (dmd->flags & CRYPT_ACTIVATE_REFRESH) { /* Refresh and recalculate means increasing dm-integrity device */ 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); } else { if (tgt->type == DM_CRYPT || tgt->type == DM_LINEAR) { diff --git a/lib/utils_blkid.c b/lib/utils_blkid.c index 9e5e80e2d..a5cf5adae 100644 --- a/lib/utils_blkid.c +++ b/lib/utils_blkid.c @@ -170,7 +170,7 @@ int blk_is_partition(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) diff --git a/tests/api-test.c b/tests/api-test.c index 7b4925bc7..c9953c3de 100644 --- a/tests/api-test.c +++ b/tests/api-test.c @@ -1694,7 +1694,7 @@ static void VerityTest(void) OK_(crypt_activate_by_volume_key(cd, NULL, root_hash, 32, 0)); 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)); if (crypt_activate_by_volume_key(cd, CDEVICE_1, root_hash, 32,