summaryrefslogtreecommitdiffstats
path: root/src/H5FD.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FD.c')
-rw-r--r--src/H5FD.c102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/H5FD.c b/src/H5FD.c
index dee74ee..b7612ef 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -169,7 +169,7 @@ H5FD__free_cls(H5FD_class_t *cls, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cls);
+ assert(cls);
/* If the file driver has a terminate callback, call it to give the file
* driver a chance to free singletons or other resources which will become
@@ -265,13 +265,13 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Sanity checks */
- HDassert(cls);
- HDassert(cls->open && cls->close);
- HDassert(cls->get_eoa && cls->set_eoa);
- HDassert(cls->get_eof);
- HDassert(cls->read && cls->write);
+ assert(cls);
+ assert(cls->open && cls->close);
+ assert(cls->get_eoa && cls->set_eoa);
+ assert(cls->get_eof);
+ assert(cls->read && cls->write);
for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++) {
- HDassert(cls->fl_map[type] >= H5FD_MEM_NOLIST && cls->fl_map[type] < H5FD_MEM_NTYPES);
+ assert(cls->fl_map[type] >= H5FD_MEM_NOLIST && cls->fl_map[type] < H5FD_MEM_NTYPES);
}
/* Copy the class structure so the caller can reuse or free it */
@@ -449,8 +449,8 @@ H5FD_sb_size(H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_size)
@@ -481,8 +481,8 @@ H5FD_sb_encode(H5FD_t *file, char *name /*out*/, uint8_t *buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_encode && (file->cls->sb_encode)(file, name /*out*/, buf /*out*/) < 0)
@@ -509,8 +509,8 @@ H5FD__sb_decode(H5FD_t *file, const char *name, const uint8_t *buf)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_decode && (file->cls->sb_decode)(file, name, buf) < 0)
@@ -537,8 +537,8 @@ H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Check if driver matches driver information saved. Unfortunately, we can't push this
* function to each specific driver because we're checking if the driver is correct.
@@ -586,8 +586,8 @@ H5FD_fapl_get(H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->fapl_get)
@@ -757,8 +757,8 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file image info")
/* If an image is provided, make sure the driver supports this feature */
- HDassert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
- ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
+ assert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
+ ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
if ((file_image_info.buffer != NULL) && !(driver_flags & H5FD_FEAT_ALLOW_FILE_IMAGE))
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file image set, but not supported.")
@@ -860,8 +860,8 @@ H5FD_close(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Prepare to close file by clearing all public fields */
driver = file->cls;
@@ -871,7 +871,7 @@ H5FD_close(H5FD_t *file)
/* Dispatch to the driver for actual close. If the driver fails to
* close the file then the file will be in an unusable state.
*/
- HDassert(driver->close);
+ assert(driver->close);
if ((driver->close)(file) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "close failed")
@@ -1009,9 +1009,9 @@ H5FD__query(const H5FD_t *file, unsigned long *flags /*out*/)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(flags);
+ assert(file);
+ assert(file->cls);
+ assert(flags);
/* Dispatch to driver (if available) */
if (file->cls->query) {
@@ -1293,7 +1293,7 @@ H5FD_get_maxaddr(const H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Set return value */
ret_value = file->maxaddr;
@@ -1316,8 +1316,8 @@ H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(feature_flags);
+ assert(file);
+ assert(feature_flags);
/* Set feature flags to return */
*feature_flags = file->feature_flags;
@@ -1340,7 +1340,7 @@ H5FD_set_feature_flags(H5FD_t *file, unsigned long feature_flags)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Set the file's feature flags */
file->feature_flags = feature_flags;
@@ -1365,9 +1365,9 @@ H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type_map);
+ assert(file);
+ assert(file->cls);
+ assert(type_map);
/* Check for VFD class providing a type map retrieval routine */
if (file->cls->get_type_map) {
@@ -1893,8 +1893,8 @@ H5FD_flush(H5FD_t *file, hbool_t closing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->flush && (file->cls->flush)(file, H5CX_get_dxpl(), closing) < 0)
@@ -1959,8 +1959,8 @@ H5FD_truncate(H5FD_t *file, hbool_t closing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->truncate && (file->cls->truncate)(file, H5CX_get_dxpl(), closing) < 0)
@@ -2018,8 +2018,8 @@ H5FD_lock(H5FD_t *file, hbool_t rw)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->lock && (file->cls->lock)(file, rw) < 0)
@@ -2077,8 +2077,8 @@ H5FD_unlock(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->unlock && (file->cls->unlock)(file) < 0)
@@ -2166,8 +2166,8 @@ H5FD_ctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver if the ctl function exists.
*
@@ -2210,8 +2210,8 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(filenum);
+ assert(file);
+ assert(filenum);
/* Retrieve the file's serial number */
*filenum = file->fileno;
@@ -2277,9 +2277,9 @@ H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(file_handle);
+ assert(file);
+ assert(file->cls);
+ assert(file_handle);
/* Dispatch to driver */
if (NULL == file->cls->get_handle)
@@ -2306,8 +2306,8 @@ H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5_addr_defined(base_addr));
+ assert(file);
+ assert(H5_addr_defined(base_addr));
/* Set the file's base address */
file->base_addr = base_addr;
@@ -2331,7 +2331,7 @@ H5FD_get_base_addr(const H5FD_t *file)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Return the file's base address */
FUNC_LEAVE_NOAPI(file->base_addr)
@@ -2352,7 +2352,7 @@ H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Indicate whether paged aggregation for handling file space is enabled or not */
file->paged_aggr = paged;