mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Prefer VERIFY0P(n) over VERIFY(n == NULL)
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
611b95da18
commit
f7bdd84328
@@ -66,9 +66,9 @@ void
|
||||
__cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg)
|
||||
{
|
||||
ASSERT(cvp);
|
||||
ASSERT(name == NULL);
|
||||
ASSERT0P(name);
|
||||
ASSERT(type == CV_DEFAULT);
|
||||
ASSERT(arg == NULL);
|
||||
ASSERT0P(arg);
|
||||
|
||||
cvp->cv_magic = CV_MAGIC;
|
||||
init_waitqueue_head(&cvp->cv_event);
|
||||
@@ -83,7 +83,7 @@ static int
|
||||
cv_destroy_wakeup(kcondvar_t *cvp)
|
||||
{
|
||||
if (!atomic_read(&cvp->cv_waiters) && !atomic_read(&cvp->cv_refs)) {
|
||||
ASSERT(cvp->cv_mutex == NULL);
|
||||
ASSERT0P(cvp->cv_mutex);
|
||||
ASSERT(!waitqueue_active(&cvp->cv_event));
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -679,8 +679,8 @@ spl_kmem_cache_create(const char *name, size_t size, size_t align,
|
||||
/*
|
||||
* Unsupported flags
|
||||
*/
|
||||
ASSERT(vmp == NULL);
|
||||
ASSERT(reclaim == NULL);
|
||||
ASSERT0P(vmp);
|
||||
ASSERT0P(reclaim);
|
||||
|
||||
might_sleep();
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ __thread_create(caddr_t stk, size_t stksize, thread_func_t func,
|
||||
|
||||
/* Option pp is simply ignored */
|
||||
/* Variable stack size unsupported */
|
||||
ASSERT(stk == NULL);
|
||||
ASSERT0P(stk);
|
||||
|
||||
tp = kmem_alloc(sizeof (thread_priv_t), KM_PUSHPAGE);
|
||||
if (tp == NULL)
|
||||
|
||||
Reference in New Issue
Block a user