diff options
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r-- | src/H5Pdcpl.c | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 298baa5..223eb3b 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -365,7 +365,7 @@ H5P__dcrt_layout_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Make copy of layout */ if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout)) @@ -402,7 +402,7 @@ H5P__dcrt_layout_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Make copy of layout */ if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout)) @@ -443,8 +443,8 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(layout); - HDassert(size); + assert(layout); + assert(size); if (NULL != *pp) { /* Encode layout type */ @@ -577,9 +577,9 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(pp); - HDassert(*pp); - HDassert(value); + assert(pp); + assert(*pp); + assert(value); /* Decode layout type */ type = (H5D_layout_t) * (*pp)++; @@ -771,7 +771,7 @@ H5P__dcrt_layout_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Reset the old layout */ if (H5O_msg_reset(H5O_LAYOUT_ID, value) < 0) @@ -803,7 +803,7 @@ H5P__dcrt_layout_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz FUNC_ENTER_PACKAGE - HDassert(layout); + assert(layout); /* Make copy of layout */ if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout)) @@ -842,9 +842,9 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_ FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(layout1); - HDassert(layout2); - HDassert(size == sizeof(H5O_layout_t)); + assert(layout1); + assert(layout2); + assert(size == sizeof(H5O_layout_t)); /* Check for different layout type */ if (layout1->type < layout2->type) @@ -942,7 +942,7 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_ case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDassert(0 && "Unknown layout type!"); + assert(0 && "Unknown layout type!"); } /* end switch */ done: @@ -970,7 +970,7 @@ H5P__dcrt_layout_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED si FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Reset the old layout */ if (H5O_msg_reset(H5O_LAYOUT_ID, value) < 0) @@ -1004,7 +1004,7 @@ H5P__dcrt_fill_value_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Make copy of fill value */ if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill)) @@ -1041,7 +1041,7 @@ H5P__dcrt_fill_value_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Make copy of fill value */ if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill)) @@ -1084,8 +1084,8 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size) /* Sanity check */ HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); HDcompile_assert(sizeof(ssize_t) <= sizeof(int64_t)); - HDassert(fill); - HDassert(size); + assert(fill); + assert(size); if (NULL != *pp) { /* Encode alloc and fill time */ @@ -1102,7 +1102,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size) *pp += fill->size; /* Encode fill value datatype */ - HDassert(fill->type); + assert(fill->type); if (H5T_encode(fill->type, NULL, &dt_size) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") @@ -1110,7 +1110,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size) /* Encode the size of a size_t */ enc_value = (uint64_t)dt_size; enc_size = H5VM_limit_enc_size(enc_value); - HDassert(enc_size < 256); + assert(enc_size < 256); /* Encode the size */ *(*pp)++ = (uint8_t)enc_size; @@ -1134,7 +1134,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size) /* calculate those if they were not calculated earlier */ if (NULL == *pp) { /* Get the size of the encoded datatype */ - HDassert(fill->type); + assert(fill->type); if (H5T_encode(fill->type, NULL, &dt_size) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") enc_value = (uint64_t)dt_size; @@ -1198,7 +1198,7 @@ H5P__dcrt_fill_value_dec(const void **_pp, void *_value) *pp += fill->size; enc_size = *(*pp)++; - HDassert(enc_size < 256); + assert(enc_size < 256); /* Decode the size of encoded datatype */ UINT64DECODE_VAR(*pp, enc_value, enc_size); @@ -1236,7 +1236,7 @@ H5P__dcrt_fill_value_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Reset the old fill value message */ if (H5O_msg_reset(H5O_FILL_ID, value) < 0) @@ -1268,7 +1268,7 @@ H5P__dcrt_fill_value_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED FUNC_ENTER_PACKAGE - HDassert(fill); + assert(fill); /* Make copy of fill value message */ if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill)) @@ -1307,9 +1307,9 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t H5_ATTR_UNUSED FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ - HDassert(fill1); - HDassert(fill2); - HDassert(size == sizeof(H5O_fill_t)); + assert(fill1); + assert(fill2); + assert(size == sizeof(H5O_fill_t)); /* Check the size of fill values */ if (fill1->size < fill2->size) @@ -1332,7 +1332,7 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t H5_ATTR_UNUSED if (fill1->buf != NULL && fill2->buf == NULL) HGOTO_DONE(1); if (fill1->buf != NULL) - if ((cmp_value = HDmemcmp(fill1->buf, fill2->buf, (size_t)fill1->size)) != 0) + if ((cmp_value = memcmp(fill1->buf, fill2->buf, (size_t)fill1->size)) != 0) HGOTO_DONE(cmp_value); /* Check the allocation time for the fill values */ @@ -1372,7 +1372,7 @@ H5P__dcrt_fill_value_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Reset the old fill value message */ if (H5O_msg_reset(H5O_FILL_ID, value) < 0) @@ -1406,7 +1406,7 @@ H5P__dcrt_ext_file_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Make copy of external file list */ if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl)) @@ -1443,7 +1443,7 @@ H5P__dcrt_ext_file_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Make copy of external file list */ if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl)) @@ -1484,17 +1484,17 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size) FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(efl); + assert(efl); HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); HDcompile_assert(sizeof(off_t) <= sizeof(uint64_t)); HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t)); - HDassert(size); + assert(size); if (NULL != *pp) { /* Encode number of slots used */ enc_value = (uint64_t)efl->nused; enc_size = H5VM_limit_enc_size(enc_value); - HDassert(enc_size < 256); + assert(enc_size < 256); *(*pp)++ = (uint8_t)enc_size; UINT64ENCODE_VAR(*pp, enc_value, enc_size); @@ -1504,7 +1504,7 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size) len = HDstrlen(efl->slot[u].name) + 1; enc_value = (uint64_t)len; enc_size = H5VM_limit_enc_size(enc_value); - HDassert(enc_size < 256); + assert(enc_size < 256); *(*pp)++ = (uint8_t)enc_size; UINT64ENCODE_VAR(*pp, enc_value, enc_size); @@ -1515,14 +1515,14 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size) /* Encode offset */ enc_value = (uint64_t)efl->slot[u].offset; enc_size = H5VM_limit_enc_size(enc_value); - HDassert(enc_size < 256); + assert(enc_size < 256); *(*pp)++ = (uint8_t)enc_size; UINT64ENCODE_VAR(*pp, enc_value, enc_size); /* encode size */ enc_value = (uint64_t)efl->slot[u].size; enc_size = H5VM_limit_enc_size(enc_value); - HDassert(enc_size < 256); + assert(enc_size < 256); *(*pp)++ = (uint8_t)enc_size; UINT64ENCODE_VAR(*pp, enc_value, enc_size); } /* end for */ @@ -1569,9 +1569,9 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(pp); - HDassert(*pp); - HDassert(efl); + assert(pp); + assert(*pp); + assert(efl); HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); HDcompile_assert(sizeof(off_t) <= sizeof(uint64_t)); HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t)); @@ -1581,7 +1581,7 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value) /* Decode number of slots used */ enc_size = *(*pp)++; - HDassert(enc_size < 256); + assert(enc_size < 256); UINT64DECODE_VAR(*pp, enc_value, enc_size); nused = (size_t)enc_value; @@ -1600,7 +1600,7 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value) /* Decode length of slot name */ enc_size = *(*pp)++; - HDassert(enc_size < 256); + assert(enc_size < 256); UINT64DECODE_VAR(*pp, enc_value, enc_size); len = (size_t)enc_value; @@ -1610,13 +1610,13 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value) /* decode offset */ enc_size = *(*pp)++; - HDassert(enc_size < 256); + assert(enc_size < 256); UINT64DECODE_VAR(*pp, enc_value, enc_size); efl->slot[u].offset = (off_t)enc_value; /* decode size */ enc_size = *(*pp)++; - HDassert(enc_size < 256); + assert(enc_size < 256); UINT64DECODE_VAR(*pp, enc_value, enc_size); efl->slot[u].size = (hsize_t)enc_value; @@ -1650,7 +1650,7 @@ H5P__dcrt_ext_file_list_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Reset the old efl message */ if (H5O_msg_reset(H5O_EFL_ID, value) < 0) @@ -1682,7 +1682,7 @@ H5P__dcrt_ext_file_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU FUNC_ENTER_PACKAGE - HDassert(efl); + assert(efl); /* Make copy of efl message */ if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl)) @@ -1722,9 +1722,9 @@ H5P__dcrt_ext_file_list_cmp(const void *_efl1, const void *_efl2, size_t H5_ATTR FUNC_ENTER_PACKAGE_NOERR /* Sanity check */ - HDassert(efl1); - HDassert(efl2); - HDassert(size == sizeof(H5O_efl_t)); + assert(efl1); + assert(efl2); + assert(size == sizeof(H5O_efl_t)); /* Check the number of allocated efl entries */ if (efl1->nalloc < efl2->nalloc) @@ -1802,7 +1802,7 @@ H5P__dcrt_ext_file_list_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UN FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(value); + assert(value); /* Reset the old efl message */ if (H5O_msg_reset(H5O_EFL_ID, value) < 0) @@ -2018,7 +2018,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]) /* Verify & initialize property's chunk dims */ H5MM_memcpy(&chunk_layout, &H5D_def_layout_chunk_g, sizeof(H5D_def_layout_chunk_g)); - HDmemset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim)); + memset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim)); chunk_nelmts = 1; for (u = 0; u < (unsigned)ndims; u++) { if (dim[u] == 0) @@ -2170,7 +2170,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const H5MM_memcpy(&virtual_layout, &H5D_def_layout_virtual_g, sizeof(H5D_def_layout_virtual_g)); /* Sanity check */ - HDassert(virtual_layout.storage.u.virt.list_nalloc == 0); + assert(virtual_layout.storage.u.virt.list_nalloc == 0); } /* end else */ /* Expand list if necessary */ @@ -2188,7 +2188,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const /* Add virtual dataset mapping entry */ ent = &virtual_layout.storage.u.virt.list[virtual_layout.storage.u.virt.list_nused]; - HDmemset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */ + memset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */ if (NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") if (NULL == (ent->source_file_name = H5MM_xstrdup(src_file_name))) @@ -2359,7 +2359,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx) /* Get the virtual space */ if (idx >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") - HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); + assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); if (NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_dset.virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") @@ -2416,7 +2416,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx) /* Check index */ if (idx >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") - HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); + assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); /* Attempt to open source dataset and patch extent if extent status is not * H5O_VIRTUAL_STATUS_CORRECT? -NAF */ @@ -2519,8 +2519,8 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si /* Get the virtual filename */ if (idx >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") - HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); - HDassert(layout.storage.u.virt.list[idx].source_file_name); + assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); + assert(layout.storage.u.virt.list[idx].source_file_name); if (name && (size > 0)) (void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_file_name, size); ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_file_name); @@ -2580,8 +2580,8 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si /* Get the virtual filename */ if (idx >= layout.storage.u.virt.list_nused) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") - HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); - HDassert(layout.storage.u.virt.list[idx].source_dset_name); + assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc); + assert(layout.storage.u.virt.list[idx].source_dset_name); if (name && (size > 0)) (void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_dset_name, size); ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_dset_name); @@ -3244,7 +3244,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/ /* Check for "default" fill value */ if (fill.size == 0) { - HDmemset(value, 0, H5T_get_size(type)); + memset(value, 0, H5T_get_size(type)); HGOTO_DONE(SUCCEED); } /* end if */ @@ -3358,8 +3358,8 @@ H5P_is_fill_value_defined(const H5O_fill_t *fill, H5D_fill_value_t *status) FUNC_ENTER_NOAPI(FAIL) - HDassert(fill); - HDassert(status); + assert(fill); + assert(status); /* Check if the fill value was "unset" */ if (fill->size == -1 && !fill->buf) @@ -3399,7 +3399,7 @@ H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status) FUNC_ENTER_NOAPI(FAIL) - HDassert(status); + assert(status); /* Get the fill value struct */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) @@ -3434,7 +3434,7 @@ H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status) FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*DF", plist_id, status); - HDassert(status); + assert(status); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) |