summaryrefslogtreecommitdiffstats
path: root/src/H5B2.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-28 14:31:56 (GMT)
committerGitHub <noreply@github.com>2023-06-28 14:31:56 (GMT)
commit7a44581a84778a1346a2fd5b6cca7d9db905a321 (patch)
tree44ea9c2d1b471eb227698abe8499c34cfa6d47d2 /src/H5B2.c
parent622fcbd13881fbc58bbeaed3062583b759f5e864 (diff)
downloadhdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.zip
hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.gz
hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.bz2
Rename HDassert() to assert() (#3191)
* Change HDassert to assert * Fix bin/make_err
Diffstat (limited to 'src/H5B2.c')
-rw-r--r--src/H5B2.c100
1 files changed, 50 insertions, 50 deletions
diff --git a/src/H5B2.c b/src/H5B2.c
index 093f8ee..04895fa 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -132,8 +132,8 @@ H5B2_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* H5B2 interface sanity check */
HDcompile_assert(H5B2_NUM_BTREE_ID == NELMTS(H5B2_client_class_g));
@@ -200,8 +200,8 @@ H5B2_open(H5F_t *f, haddr_t addr, void *ctx_udata)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(f);
- HDassert(H5_addr_defined(addr));
+ assert(f);
+ assert(H5_addr_defined(addr));
/* Look up the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__READ_ONLY_FLAG)))
@@ -263,8 +263,8 @@ H5B2_insert(H5B2_t *bt2, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(udata);
+ assert(bt2);
+ assert(udata);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -305,8 +305,8 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(udata);
+ assert(bt2);
+ assert(udata);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -333,7 +333,7 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
} /* end else */
/* Sanity check */
- HDassert(H5B2_UPDATE_UNKNOWN != status);
+ assert(H5B2_UPDATE_UNKNOWN != status);
/* Use insert algorithm if nodes to leaf full */
if (H5B2_UPDATE_INSERT_CHILD_FULL == status) {
@@ -347,7 +347,7 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
} /* end else-if */
else {
/* Sanity check */
- HDassert(H5B2_UPDATE_MODIFY_DONE == status);
+ assert(H5B2_UPDATE_MODIFY_DONE == status);
} /* end else */
done:
@@ -374,8 +374,8 @@ H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(addr_p);
+ assert(bt2);
+ assert(addr_p);
/* Retrieve the header address for this v2 B-tree */
*addr_p = bt2->hdr->addr;
@@ -408,8 +408,8 @@ H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -463,8 +463,8 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(found);
+ assert(bt2);
+ assert(found);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -686,7 +686,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -723,8 +723,8 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -845,7 +845,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
} /* end if */
else
/* Index that is greater than the number of records in the tree? */
- HDassert(0 && "Index off end of tree??");
+ assert(0 && "Index off end of tree??");
} /* end if */
/* Decrement depth we're at in B-tree */
@@ -867,7 +867,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
} /* end if */
/* Sanity check index */
- HDassert(idx < leaf->nrec);
+ assert(idx < leaf->nrec);
/* Make callback for correct record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) {
@@ -885,7 +885,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -914,7 +914,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -946,7 +946,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't destroy node's node pointer block factory")
- HDassert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
+ assert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
hdr->depth = (uint16_t)(hdr->depth - depth_decreased);
} /* end for */
} /* end if */
@@ -987,7 +987,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1027,7 +1027,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't destroy node's node pointer block factory")
- HDassert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
+ assert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
hdr->depth = (uint16_t)(hdr->depth - depth_decreased);
} /* end for */
} /* end if */
@@ -1065,8 +1065,8 @@ H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(bt2);
- HDassert(nrec);
+ assert(bt2);
+ assert(nrec);
/* Get B-tree number of records */
*nrec = bt2->hdr->root.all_nrec;
@@ -1107,8 +1107,8 @@ H5B2_neighbor(H5B2_t *bt2, H5B2_compare_t range, void *udata, H5B2_found_t op, v
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1169,8 +1169,8 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1263,7 +1263,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
/* Make callback for current record */
if ((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
/* Unlock current node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) <
@@ -1327,7 +1327,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
/* Make callback for current record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
/* Unlock current node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
@@ -1371,7 +1371,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -1401,8 +1401,8 @@ H5B2_close(H5B2_t *bt2)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(bt2);
- HDassert(bt2->f);
+ assert(bt2);
+ assert(bt2->f);
/* Decrement file reference & check if this is the last open v2 B-tree using the shared B-tree header */
if (0 == H5B2__hdr_fuse_decr(bt2->hdr)) {
@@ -1424,7 +1424,7 @@ H5B2_close(H5B2_t *bt2)
H5B2_hdr_t *hdr; /* Another pointer to v2 B-tree header */
/* Sanity check */
- HDassert(H5_addr_defined(bt2_addr));
+ assert(H5_addr_defined(bt2_addr));
#ifndef NDEBUG
{
@@ -1437,9 +1437,9 @@ H5B2_close(H5B2_t *bt2)
(unsigned long long)bt2_addr)
/* Sanity checks on header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PINNED);
- HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PINNED);
+ assert(!(hdr_status & H5AC_ES__IS_PROTECTED));
}
#endif /* NDEBUG */
@@ -1511,8 +1511,8 @@ H5B2_delete(H5F_t *f, haddr_t addr, void *ctx_udata, H5B2_remove_t op, void *op_
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(H5_addr_defined(addr));
+ assert(f);
+ assert(H5_addr_defined(addr));
/* Lock the v2 B-tree header into memory */
if (NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__NO_FLAGS_SET)))
@@ -1568,10 +1568,10 @@ H5B2_depend(H5B2_t *bt2, H5AC_proxy_entry_t *parent)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(hdr);
- HDassert(parent);
- HDassert(hdr->parent == NULL || hdr->parent == parent);
+ assert(bt2);
+ assert(hdr);
+ assert(parent);
+ assert(hdr->parent == NULL || hdr->parent == parent);
/*
* Check to see if the flush dependency between the parent
@@ -1580,7 +1580,7 @@ H5B2_depend(H5B2_t *bt2, H5AC_proxy_entry_t *parent)
*/
if (NULL == hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Set the shared v2 B-tree header's file context for this operation */
hdr->f = bt2->f;
@@ -1615,8 +1615,8 @@ H5B2_patch_file(H5B2_t *bt2, H5F_t *f)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(f);
+ assert(bt2);
+ assert(f);
if (bt2->f != f || bt2->hdr->f != f)
bt2->f = bt2->hdr->f = f;