Make all crypto backend destructors return void.

Nothing in the code actually checks the return values anyway.
This commit is contained in:
Milan Broz
2018-02-23 08:47:53 +01:00
parent fb6b4739e4
commit b4fc36ea62
8 changed files with 20 additions and 34 deletions

View File

@@ -178,7 +178,7 @@ static int crypt_sector_iv_generate(struct crypt_sector_iv *ctx, uint64_t sector
return 0;
}
static int crypt_sector_iv_destroy(struct crypt_sector_iv *ctx)
static void crypt_sector_iv_destroy(struct crypt_sector_iv *ctx)
{
if (ctx->type == IV_ESSIV)
crypt_cipher_destroy(ctx->essiv_cipher);
@@ -189,7 +189,6 @@ static int crypt_sector_iv_destroy(struct crypt_sector_iv *ctx)
}
memset(ctx, 0, sizeof(*ctx));
return 0;
}
/* Block encryption storage wrappers */
@@ -285,10 +284,10 @@ int crypt_storage_encrypt(struct crypt_storage *ctx,
return r;
}
int crypt_storage_destroy(struct crypt_storage *ctx)
void crypt_storage_destroy(struct crypt_storage *ctx)
{
if (!ctx)
return 0;
return;
crypt_sector_iv_destroy(&ctx->cipher_iv);
@@ -297,6 +296,4 @@ int crypt_storage_destroy(struct crypt_storage *ctx)
memset(ctx, 0, sizeof(*ctx));
free(ctx);
return 0;
}