Print this page
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero
@@ -160,11 +160,11 @@
if (tbl->zt_nextblk != 0) {
newblk = tbl->zt_nextblk;
} else {
newblk = zap_allocate_blocks(zap, tbl->zt_numblks * 2);
tbl->zt_nextblk = newblk;
- ASSERT3U(tbl->zt_blks_copied, ==, 0);
+ ASSERT0(tbl->zt_blks_copied);
dmu_prefetch(zap->zap_objset, zap->zap_object,
tbl->zt_blk << bs, tbl->zt_numblks << bs);
}
/*
@@ -337,11 +337,11 @@
dmu_buf_t *db_new;
int err;
ASSERT3U(zap->zap_f.zap_phys->zap_ptrtbl.zt_shift, ==,
ZAP_EMBEDDED_PTRTBL_SHIFT(zap));
- ASSERT3U(zap->zap_f.zap_phys->zap_ptrtbl.zt_blk, ==, 0);
+ ASSERT0(zap->zap_f.zap_phys->zap_ptrtbl.zt_blk);
newblk = zap_allocate_blocks(zap, 1);
err = dmu_buf_hold(zap->zap_objset, zap->zap_object,
newblk << FZAP_BLOCK_SHIFT(zap), FTAG, &db_new,
DMU_READ_NO_PREFETCH);
@@ -473,11 +473,11 @@
/*
* lhr_pad was previously used for the next leaf in the leaf
* chain. There should be no chained leafs (as we have removed
* support for them).
*/
- ASSERT3U(l->l_phys->l_hdr.lh_pad1, ==, 0);
+ ASSERT0(l->l_phys->l_hdr.lh_pad1);
/*
* There should be more hash entries than there can be
* chunks to put in the hash table
*/
@@ -656,13 +656,13 @@
nl = zap_create_leaf(zap, tx);
zap_leaf_split(l, nl, zap->zap_normflags != 0);
/* set sibling pointers */
- for (i = 0; i < (1ULL<<prefix_diff); i++) {
+ for (i = 0; i < (1ULL << prefix_diff); i++) {
err = zap_set_idx_to_blk(zap, sibling+i, nl->l_blkid, tx);
- ASSERT3U(err, ==, 0); /* we checked for i/o errors above */
+ ASSERT0(err); /* we checked for i/o errors above */
}
if (hash & (1ULL << (64 - l->l_phys->l_hdr.lh_prefix_len))) {
/* we want the sibling */
zap_put_leaf(l);