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/H5Dfill.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/H5Dfill.c')
-rw-r--r-- | src/H5Dfill.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/H5Dfill.c b/src/H5Dfill.c index 5275323..c22036e 100644 --- a/src/H5Dfill.c +++ b/src/H5Dfill.c @@ -128,10 +128,10 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ FUNC_ENTER_PACKAGE /* Check args */ - HDassert(fill_type); - HDassert(buf); - HDassert(buf_type); - HDassert(space); + assert(fill_type); + assert(buf); + assert(buf_type); + assert(space); /* Make sure the dataspace has an extent set (or is NULL) */ if (!(H5S_has_extent(space))) @@ -313,10 +313,10 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat FUNC_ENTER_PACKAGE /* Check args */ - HDassert(fb_info); - HDassert(fill); - HDassert(dset_type); - HDassert(dset_type_id > 0); + assert(fb_info); + assert(fill); + assert(dset_type); + assert(dset_type_id > 0); /* Reset fill buffer information */ HDmemset(fb_info, 0, sizeof(*fb_info)); @@ -349,9 +349,9 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat /* Retrieve sizes of memory & file datatypes */ fb_info->mem_elmt_size = H5T_get_size(fb_info->mem_type); - HDassert(fb_info->mem_elmt_size > 0); + assert(fb_info->mem_elmt_size > 0); fb_info->file_elmt_size = H5T_get_size(dset_type); - HDassert(fb_info->file_elmt_size == (size_t)fill->size); + assert(fb_info->file_elmt_size == (size_t)fill->size); /* If fill value is not library default, use it to set the element size */ fb_info->max_elmt_size = MAX(fb_info->mem_elmt_size, fb_info->file_elmt_size); @@ -361,7 +361,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size))); else fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size; - HDassert(fb_info->elmts_per_buf > 0); + assert(fb_info->elmts_per_buf > 0); /* Compute the buffer size to use */ fb_info->fill_buf_size = MIN(max_buf_size, (fb_info->elmts_per_buf * fb_info->max_elmt_size)); @@ -406,7 +406,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat } /* end if */ else { /* If fill value is not library default, use it to set the element size */ - HDassert(fill->size >= 0); + assert(fill->size >= 0); fb_info->max_elmt_size = fb_info->file_elmt_size = fb_info->mem_elmt_size = (size_t)fill->size; /* Compute the number of elements that fit within a buffer to write */ @@ -414,7 +414,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size))); else fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size; - HDassert(fb_info->elmts_per_buf > 0); + assert(fb_info->elmts_per_buf > 0); /* Compute the buffer size to use */ fb_info->fill_buf_size = MIN(max_buf_size, fb_info->elmts_per_buf * fb_info->max_elmt_size); @@ -440,14 +440,14 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat else { /* Fill the buffer with the default fill value */ /* Retrieve size of elements */ fb_info->max_elmt_size = fb_info->file_elmt_size = fb_info->mem_elmt_size = H5T_get_size(dset_type); - HDassert(fb_info->max_elmt_size > 0); + assert(fb_info->max_elmt_size > 0); /* Compute the number of elements that fit within a buffer to write */ if (total_nelmts > 0) fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size))); else fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size; - HDassert(fb_info->elmts_per_buf > 0); + assert(fb_info->elmts_per_buf > 0); /* Compute the buffer size to use */ fb_info->fill_buf_size = MIN(max_buf_size, (fb_info->elmts_per_buf * fb_info->max_elmt_size)); @@ -469,7 +469,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat htri_t buf_avail = H5FL_BLK_AVAIL( zero_fill, fb_info->fill_buf_size); /* Check if there is an already zeroed out buffer available */ - HDassert(buf_avail != FAIL); + assert(buf_avail != FAIL); /* Allocate temporary buffer (zeroing it if no buffer is available) */ if (!buf_avail) @@ -512,9 +512,9 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts) FUNC_ENTER_PACKAGE /* Check args */ - HDassert(fb_info); - HDassert(fb_info->has_vlen_fill_type); - HDassert(fb_info->fill_buf); + assert(fb_info); + assert(fb_info->has_vlen_fill_type); + assert(fb_info->fill_buf); /* Make a copy of the (disk-based) fill value into the buffer */ H5MM_memcpy(fb_info->fill_buf, fb_info->fill->buf, fb_info->file_elmt_size); @@ -592,8 +592,8 @@ H5D__fill_release(H5D_fill_buf_info_t *fb_info) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(fb_info); - HDassert(fb_info->fill); + assert(fb_info); + assert(fb_info->fill); /* Free the buffer for fill values */ if (!fb_info->use_caller_fill_buf && fb_info->fill_buf) { @@ -629,7 +629,7 @@ H5D__fill_term(H5D_fill_buf_info_t *fb_info) FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(fb_info); + assert(fb_info); /* Free the buffer for fill values */ H5D__fill_release(fb_info); |