mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Cleanup: Use NULL when doing NULL pointer comparisons
The Linux 5.16.14 kernel's coccicheck caught this. The semantic patch that caught it was: ./scripts/coccinelle/null/badzero.cocci Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14372
This commit is contained in:
committed by
Brian Behlendorf
parent
64195fc89f
commit
4ef69de384
@@ -47,7 +47,7 @@ void
|
||||
abd_checksum_blake3_native(abd_t *abd, uint64_t size, const void *ctx_template,
|
||||
zio_cksum_t *zcp)
|
||||
{
|
||||
ASSERT(ctx_template != 0);
|
||||
ASSERT(ctx_template != NULL);
|
||||
|
||||
#if defined(_KERNEL)
|
||||
BLAKE3_CTX *ctx = blake3_per_cpu_ctx[CPU_SEQID_UNSTABLE];
|
||||
@@ -76,7 +76,7 @@ abd_checksum_blake3_byteswap(abd_t *abd, uint64_t size,
|
||||
{
|
||||
zio_cksum_t tmp;
|
||||
|
||||
ASSERT(ctx_template != 0);
|
||||
ASSERT(ctx_template != NULL);
|
||||
|
||||
abd_checksum_blake3_native(abd, size, ctx_template, &tmp);
|
||||
zcp->zc_word[0] = BSWAP_64(tmp.zc_word[0]);
|
||||
|
||||
Reference in New Issue
Block a user