diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 14:31:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 14:31:56 (GMT) |
commit | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (patch) | |
tree | 44ea9c2d1b471eb227698abe8499c34cfa6d47d2 /src/H5MFsection.c | |
parent | 622fcbd13881fbc58bbeaed3062583b759f5e864 (diff) | |
download | hdf5-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/H5MFsection.c')
-rw-r--r-- | src/H5MFsection.c | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 8107ad3..f2ed3b2 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -193,7 +193,7 @@ H5MF__sect_new(unsigned ctype, haddr_t sect_off, hsize_t sect_size) FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(sect_size); + assert(sect_size); /* Create free space section node */ if (NULL == (sect = H5FL_MALLOC(H5MF_free_section_t))) @@ -236,7 +236,7 @@ H5MF__sect_free(H5FS_section_info_t *_sect) FUNC_ENTER_PACKAGE_NOERR /* Check arguments. */ - HDassert(sect); + assert(sect); /* Release the section */ sect = H5FL_FREE(H5MF_free_section_t, sect); @@ -267,9 +267,9 @@ H5MF__sect_deserialize(const H5FS_section_class_t *cls, const uint8_t H5_ATTR_UN FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(cls); - HDassert(H5_addr_defined(sect_addr)); - HDassert(sect_size); + assert(cls); + assert(H5_addr_defined(sect_addr)); + assert(sect_size); /* Create free space section for block */ if (NULL == (sect = H5MF__sect_new(cls->type, sect_addr, sect_size))) @@ -309,7 +309,7 @@ H5MF__sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_sect FUNC_ENTER_PACKAGE_NOERR /* Check arguments. */ - HDassert(sect); + assert(sect); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5MF__sect_valid() */ @@ -376,10 +376,10 @@ H5MF__sect_simple_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio FUNC_ENTER_PACKAGE_NOERR /* Check arguments. */ - HDassert(sect1); - HDassert(sect2); - HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ - HDassert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); + assert(sect1); + assert(sect2); + assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ + assert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); /* Check if second section adjoins first section */ ret_value = H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr); @@ -413,11 +413,11 @@ H5MF__sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(sect1); - HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SIMPLE); - HDassert(sect2); - HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_SIMPLE); - HDassert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr)); + assert(sect1); + assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SIMPLE); + assert(sect2); + assert(sect2->sect_info.type == H5MF_FSPACE_SECT_SIMPLE); + assert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr)); /* Add second section's size to first section */ (*sect1)->sect_info.size += sect2->sect_info.size; @@ -455,9 +455,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(sect); - HDassert(udata); - HDassert(udata->f); + assert(sect); + assert(udata); + assert(udata->f); /* Retrieve the end of the file's address space */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(udata->f, udata->alloc_type))) @@ -559,14 +559,14 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata) FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(sect); - HDassert(udata); - HDassert(udata->f); + assert(sect); + assert(udata); + assert(udata->f); /* Check for shrinking file */ if (H5MF_SHRINK_EOA == udata->shrink) { /* Sanity check */ - HDassert(H5F_INTENT(udata->f) & H5F_ACC_RDWR); + assert(H5F_INTENT(udata->f) & H5F_ACC_RDWR); /* Release section's space at EOA */ if (H5F__free(udata->f, udata->alloc_type, (*sect)->sect_info.addr, (*sect)->sect_info.size) < 0) @@ -574,7 +574,7 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata) } /* end if */ else { /* Sanity check */ - HDassert(udata->aggr); + assert(udata->aggr); /* Absorb the section into the aggregator or vice versa */ if (H5MF__aggr_absorb(udata->f, udata->aggr, *sect, udata->allow_sect_absorb) < 0) @@ -690,10 +690,10 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section FUNC_ENTER_PACKAGE_NOERR /* Check arguments. */ - HDassert(sect1); - HDassert(sect2); - HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ - HDassert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); + assert(sect1); + assert(sect2); + assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ + assert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); /* Check if second section adjoins first section */ ret_value = H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr); @@ -737,11 +737,11 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2 FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(sect1); - HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SMALL); - HDassert(sect2); - HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_SMALL); - HDassert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr)); + assert(sect1); + assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SMALL); + assert(sect2); + assert(sect2->sect_info.type == H5MF_FSPACE_SECT_SMALL); + assert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr)); /* Add second section's size to first section */ (*sect1)->sect_info.size += sect2->sect_info.size; @@ -800,10 +800,10 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section FUNC_ENTER_PACKAGE_NOERR /* Check arguments. */ - HDassert(sect1); - HDassert(sect2); - HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ - HDassert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); + assert(sect1); + assert(sect2); + assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ + assert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); ret_value = H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr); @@ -838,11 +838,11 @@ H5MF__sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2 FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(sect1); - HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_LARGE); - HDassert(sect2); - HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_LARGE); - HDassert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr)); + assert(sect1); + assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_LARGE); + assert(sect2); + assert(sect2->sect_info.type == H5MF_FSPACE_SECT_LARGE); + assert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr)); /* Add second section's size to first section */ (*sect1)->sect_info.size += sect2->sect_info.size; @@ -879,10 +879,10 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata) FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(sect); - HDassert(sect->sect_info.type == H5MF_FSPACE_SECT_LARGE); - HDassert(udata); - HDassert(udata->f); + assert(sect); + assert(sect->sect_info.type == H5MF_FSPACE_SECT_LARGE); + assert(udata); + assert(udata->f); /* Retrieve the end of the file's address space */ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(udata->f->shared->lf, udata->alloc_type))) @@ -932,13 +932,13 @@ H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *_udata) FUNC_ENTER_PACKAGE /* Check arguments. */ - HDassert(sect); - HDassert((*sect)->sect_info.type == H5MF_FSPACE_SECT_LARGE); - HDassert(udata); - HDassert(udata->f); - HDassert(udata->shrink == H5MF_SHRINK_EOA); - HDassert(H5F_INTENT(udata->f) & H5F_ACC_RDWR); - HDassert(H5F_PAGED_AGGR(udata->f)); + assert(sect); + assert((*sect)->sect_info.type == H5MF_FSPACE_SECT_LARGE); + assert(udata); + assert(udata->f); + assert(udata->shrink == H5MF_SHRINK_EOA); + assert(H5F_INTENT(udata->f) & H5F_ACC_RDWR); + assert(H5F_PAGED_AGGR(udata->f)); /* Calculate possible mis-aligned fragment */ H5MF_EOA_MISALIGN(udata->f, (*sect)->sect_info.addr, udata->f->shared->fs_page_size, frag_size); |