mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Prefer VERIFY0(n) over VERIFY(n == 0)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #17591
This commit is contained in:
committed by
Brian Behlendorf
parent
2564308cb2
commit
c39e076f23
@@ -124,7 +124,7 @@ kcf_context_cache_destructor(void *buf, void *cdrarg)
|
||||
(void) cdrarg;
|
||||
kcf_context_t *kctx = (kcf_context_t *)buf;
|
||||
|
||||
ASSERT(kctx->kc_refcnt == 0);
|
||||
ASSERT0(kctx->kc_refcnt);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+5
-5
@@ -236,16 +236,16 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism,
|
||||
aes_xor_block);
|
||||
if (ret != CRYPTO_SUCCESS)
|
||||
goto out;
|
||||
ASSERT(aes_ctx.ac_remainder_len == 0);
|
||||
ASSERT0(aes_ctx.ac_remainder_len);
|
||||
} else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE) {
|
||||
ret = gcm_encrypt_final((gcm_ctx_t *)&aes_ctx,
|
||||
ciphertext, AES_BLOCK_LEN, aes_encrypt_block,
|
||||
aes_copy_block, aes_xor_block);
|
||||
if (ret != CRYPTO_SUCCESS)
|
||||
goto out;
|
||||
ASSERT(aes_ctx.ac_remainder_len == 0);
|
||||
ASSERT0(aes_ctx.ac_remainder_len);
|
||||
} else {
|
||||
ASSERT(aes_ctx.ac_remainder_len == 0);
|
||||
ASSERT0(aes_ctx.ac_remainder_len);
|
||||
}
|
||||
|
||||
if (plaintext != ciphertext) {
|
||||
@@ -337,7 +337,7 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism,
|
||||
ret = ccm_decrypt_final((ccm_ctx_t *)&aes_ctx,
|
||||
plaintext, AES_BLOCK_LEN, aes_encrypt_block,
|
||||
aes_copy_block, aes_xor_block);
|
||||
ASSERT(aes_ctx.ac_remainder_len == 0);
|
||||
ASSERT0(aes_ctx.ac_remainder_len);
|
||||
if ((ret == CRYPTO_SUCCESS) &&
|
||||
(ciphertext != plaintext)) {
|
||||
plaintext->cd_length =
|
||||
@@ -349,7 +349,7 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism,
|
||||
ret = gcm_decrypt_final((gcm_ctx_t *)&aes_ctx,
|
||||
plaintext, AES_BLOCK_LEN, aes_encrypt_block,
|
||||
aes_xor_block);
|
||||
ASSERT(aes_ctx.ac_remainder_len == 0);
|
||||
ASSERT0(aes_ctx.ac_remainder_len);
|
||||
if ((ret == CRYPTO_SUCCESS) &&
|
||||
(ciphertext != plaintext)) {
|
||||
plaintext->cd_length =
|
||||
|
||||
Reference in New Issue
Block a user