Prefer VERIFY0P(n) over VERIFY3P(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:
Rob Norris
2025-08-04 20:00:19 +10:00
committed by Brian Behlendorf
parent f7bdd84328
commit 82d6f7b047
64 changed files with 215 additions and 215 deletions
+3 -3
View File
@@ -265,7 +265,7 @@ nv_priv_alloc_embedded(nvpriv_t *priv)
static int
nvt_tab_alloc(nvpriv_t *priv, uint64_t buckets)
{
ASSERT3P(priv->nvp_hashtable, ==, NULL);
ASSERT0P(priv->nvp_hashtable);
ASSERT0(priv->nvp_nbuckets);
ASSERT0(priv->nvp_nentries);
@@ -334,7 +334,7 @@ nvt_lookup_name_type(const nvlist_t *nvl, const char *name, data_type_t type)
i_nvp_t **tab = priv->nvp_hashtable;
if (tab == NULL) {
ASSERT3P(priv->nvp_list, ==, NULL);
ASSERT0P(priv->nvp_list);
ASSERT0(priv->nvp_nbuckets);
ASSERT0(priv->nvp_nentries);
return (NULL);
@@ -540,7 +540,7 @@ nvt_add_nvpair(nvlist_t *nvl, nvpair_t *nvp)
/* insert link at the beginning of the bucket */
i_nvp_t *new_entry = NVPAIR2I_NVP(nvp);
ASSERT3P(new_entry->nvi_hashtable_next, ==, NULL);
ASSERT0P(new_entry->nvi_hashtable_next);
new_entry->nvi_hashtable_next = bucket;
// cppcheck-suppress nullPointerRedundantCheck
tab[index] = new_entry;