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:
Rob Norris
2025-08-04 12:07:14 +10:00
committed by Brian Behlendorf
parent 2564308cb2
commit c39e076f23
64 changed files with 332 additions and 349 deletions
+2 -2
View File
@@ -108,7 +108,7 @@ rrn_add(rrwlock_t *rrl, const void *tag)
rn->rn_rrl = rrl;
rn->rn_next = tsd_get(rrw_tsd_key);
rn->rn_tag = tag;
VERIFY(tsd_set(rrw_tsd_key, rn) == 0);
VERIFY0(tsd_set(rrw_tsd_key, rn));
}
/*
@@ -129,7 +129,7 @@ rrn_find_and_remove(rrwlock_t *rrl, const void *tag)
if (prev)
prev->rn_next = rn->rn_next;
else
VERIFY(tsd_set(rrw_tsd_key, rn->rn_next) == 0);
VERIFY0(tsd_set(rrw_tsd_key, rn->rn_next));
kmem_free(rn, sizeof (*rn));
return (B_TRUE);
}