diff options
Diffstat (limited to 'src/H5Gdense.c')
-rw-r--r-- | src/H5Gdense.c | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/src/H5Gdense.c b/src/H5Gdense.c index 4c74fa8..2b75925 100644 --- a/src/H5Gdense.c +++ b/src/H5Gdense.c @@ -260,8 +260,8 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline) /* * Check arguments. */ - HDassert(f); - HDassert(linfo); + assert(f); + assert(linfo); /* Set fractal heap creation parameters */ /* XXX: Give some control of these to applications? */ @@ -287,7 +287,7 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline) /* Retrieve the heap's ID length in the file */ if (H5HF_get_id_len(fheap, &fheap_id_len) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length") - HDassert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN); + assert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN); /* Create the name index v2 B-tree */ HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam)); @@ -366,9 +366,9 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk) /* * Check arguments. */ - HDassert(f); - HDassert(linfo); - HDassert(lnk); + assert(f); + assert(linfo); + assert(lnk); /* Find out the size of buffer needed for serialized link */ if ((link_size = H5O_msg_raw_size(f, H5O_LINK_ID, FALSE, lnk)) == 0) @@ -415,7 +415,7 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk) /* Check if we should create a creation order index v2 B-tree record */ if (linfo->index_corder) { /* Open the creation order index v2 B-tree */ - HDassert(H5_addr_defined(linfo->corder_bt2_addr)); + assert(H5_addr_defined(linfo->corder_bt2_addr)); if (NULL == (bt2_corder = H5B2_open(f, linfo->corder_bt2_addr, NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index") @@ -462,8 +462,8 @@ H5G__dense_lookup_cb(const void *_lnk, void *_user_lnk) /* * Check arguments. */ - HDassert(lnk); - HDassert(user_lnk); + assert(lnk); + assert(user_lnk); /* Copy link information */ if (H5O_msg_copy(H5O_LINK_ID, lnk, user_lnk) == NULL) @@ -498,11 +498,11 @@ H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, hbool_t /* * Check arguments. */ - HDassert(f); - HDassert(linfo); - HDassert(name && *name); - HDassert(found); - HDassert(lnk); + assert(f); + assert(linfo); + assert(name && *name); + assert(found); + assert(lnk); /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) @@ -636,9 +636,9 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type /* * Check arguments. */ - HDassert(f); - HDassert(linfo); - HDassert(lnk); + assert(f); + assert(linfo); + assert(lnk); /* Determine the address of the index to use */ if (idx_type == H5_INDEX_NAME) { @@ -649,7 +649,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type bt2_addr = HADDR_UNDEF; } /* end if */ else { - HDassert(idx_type == H5_INDEX_CRT_ORDER); + assert(idx_type == H5_INDEX_CRT_ORDER); /* This address may not be defined if creation order is tracked, but * there's no index on it. If there's no v2 B-tree that indexes @@ -665,7 +665,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type */ if (order == H5_ITER_NATIVE && !H5_addr_defined(bt2_addr)) { bt2_addr = linfo->name_bt2_addr; - HDassert(H5_addr_defined(bt2_addr)); + assert(H5_addr_defined(bt2_addr)); } /* end if */ /* If there is an index defined for the field, use it */ @@ -738,9 +738,9 @@ H5G__dense_build_table_cb(const H5O_link_t *lnk, void *_udata) FUNC_ENTER_PACKAGE /* check arguments */ - HDassert(lnk); - HDassert(udata); - HDassert(udata->curr_lnk < udata->ltable->nlinks); + assert(lnk); + assert(udata); + assert(udata->curr_lnk < udata->ltable->nlinks); /* Copy link information */ if (H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])) == NULL) @@ -778,9 +778,9 @@ H5G__dense_build_table(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(f); - HDassert(linfo); - HDassert(ltable); + assert(f); + assert(linfo); + assert(ltable); /* Set size of table */ H5_CHECK_OVERFLOW(linfo->nlinks, /* From: */ hsize_t, /* To: */ size_t); @@ -931,9 +931,9 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i /* * Check arguments. */ - HDassert(f); - HDassert(linfo); - HDassert(op); + assert(f); + assert(linfo); + assert(op); /* Determine the address of the index to use */ if (idx_type == H5_INDEX_NAME) { @@ -944,7 +944,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i bt2_addr = HADDR_UNDEF; } /* end if */ else { - HDassert(idx_type == H5_INDEX_CRT_ORDER); + assert(idx_type == H5_INDEX_CRT_ORDER); /* This address may not be defined if creation order is tracked, but * there's no index on it. If there's no v2 B-tree that indexes @@ -959,7 +959,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i * process. */ if (order == H5_ITER_NATIVE && !H5_addr_defined(bt2_addr)) { - HDassert(H5_addr_defined(linfo->name_bt2_addr)); + assert(H5_addr_defined(linfo->name_bt2_addr)); bt2_addr = linfo->name_bt2_addr; } /* end if */ @@ -968,7 +968,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i H5G_bt2_ud_it_t udata; /* User data for iterator callback */ /* Sanity check */ - HDassert(H5_addr_defined(bt2_addr)); + assert(H5_addr_defined(bt2_addr)); /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) @@ -1127,8 +1127,8 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5 /* * Check arguments. */ - HDassert(f); - HDassert(linfo); + assert(f); + assert(linfo); /* Determine the address of the index to use */ if (idx_type == H5_INDEX_NAME) { @@ -1139,7 +1139,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5 bt2_addr = HADDR_UNDEF; } /* end if */ else { - HDassert(idx_type == H5_INDEX_CRT_ORDER); + assert(idx_type == H5_INDEX_CRT_ORDER); /* This address may not be defined if creation order is tracked, but * there's no index on it. If there's no v2 B-tree that indexes @@ -1155,7 +1155,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5 */ if (order == H5_ITER_NATIVE && !H5_addr_defined(bt2_addr)) { bt2_addr = linfo->name_bt2_addr; - HDassert(H5_addr_defined(bt2_addr)); + assert(H5_addr_defined(bt2_addr)); } /* end if */ /* If there is an index defined for the field, use it */ @@ -1251,7 +1251,7 @@ H5G__dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata) HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index") /* Set up the user data for the v2 B-tree 'record remove' callback */ - HDassert(lnk->corder_valid); + assert(lnk->corder_valid); bt2_udata.corder = lnk->corder; /* Remove the record from the name index v2 B-tree */ @@ -1346,9 +1346,9 @@ H5G__dense_remove(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_ /* * Check arguments. */ - HDassert(f); - HDassert(linfo); - HDassert(name && *name); + assert(f); + assert(linfo); + assert(name && *name); /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) @@ -1448,7 +1448,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) else { const H5G_dense_bt2_corder_rec_t *record = (const H5G_dense_bt2_corder_rec_t *)_record; - HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER); + assert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER); /* Set the heap ID to operate on */ heap_id = record->id; @@ -1461,7 +1461,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) /* Call fractal heap 'op' routine, to perform user callback */ if (H5HF_op(bt2_udata->fheap, heap_id, H5G__dense_remove_by_idx_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed") - HDassert(fh_udata.lnk); + assert(fh_udata.lnk); /* Check for removing the link from the "other" index (creation order, when name used and vice versa) */ if (H5_addr_defined(bt2_udata->other_bt2_addr)) { @@ -1473,7 +1473,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) other_bt2_udata.corder = fh_udata.lnk->corder; } /* end if */ else { - HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER); + assert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER); /* Set up the user data for the v2 B-tree 'record remove' callback */ other_bt2_udata.f = bt2_udata->f; @@ -1549,8 +1549,8 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful /* * Check arguments. */ - HDassert(f); - HDassert(linfo); + assert(f); + assert(linfo); /* Determine the address of the index to use */ if (idx_type == H5_INDEX_NAME) { @@ -1561,7 +1561,7 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful bt2_addr = HADDR_UNDEF; } /* end if */ else { - HDassert(idx_type == H5_INDEX_CRT_ORDER); + assert(idx_type == H5_INDEX_CRT_ORDER); /* This address may not be defined if creation order is tracked, but * there's no index on it. If there's no v2 B-tree that indexes @@ -1577,7 +1577,7 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful */ if (order == H5_ITER_NATIVE && !H5_addr_defined(bt2_addr)) { bt2_addr = linfo->name_bt2_addr; - HDassert(H5_addr_defined(bt2_addr)); + assert(H5_addr_defined(bt2_addr)); } /* end if */ /* If there is an index defined for the field, use it */ @@ -1651,8 +1651,8 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link) /* * Check arguments. */ - HDassert(f); - HDassert(linfo); + assert(f); + assert(linfo); /* Check if we are to adjust the ref. count for all the links */ /* (we adjust the ref. count when deleting a group and we _don't_ adjust @@ -1696,13 +1696,13 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link) /* Check if we should delete the creation order index v2 B-tree */ if (linfo->index_corder) { /* Delete the creation order index, without adjusting the ref. count on the links */ - HDassert(H5_addr_defined(linfo->corder_bt2_addr)); + assert(H5_addr_defined(linfo->corder_bt2_addr)); if (H5B2_delete(f, linfo->corder_bt2_addr, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for creation order index") linfo->corder_bt2_addr = HADDR_UNDEF; } /* end if */ else - HDassert(!H5_addr_defined(linfo->corder_bt2_addr)); + assert(!H5_addr_defined(linfo->corder_bt2_addr)); /* Delete the fractal heap */ if (H5HF_delete(f, linfo->fheap_addr) < 0) |