summaryrefslogtreecommitdiffstats
path: root/src/H5Fsuper_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fsuper_cache.c')
-rw-r--r--src/H5Fsuper_cache.c122
1 files changed, 61 insertions, 61 deletions
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 7dbaf22..9345f66 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -148,11 +148,11 @@ H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, si
FUNC_ENTER_PACKAGE
- HDassert(sblock);
- HDassert(image_ref);
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sblock);
+ assert(image_ref);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
/* Skip over signature (already checked when locating the superblock) */
if (H5_IS_BUFFER_OVERFLOW(image, H5F_SIGNATURE_LEN, end))
@@ -234,11 +234,11 @@ H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8
FUNC_ENTER_PACKAGE
- HDassert(drvrinfo);
- HDassert(image_ref);
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
+ assert(drvrinfo);
+ assert(image_ref);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
/* Version number */
if (H5_IS_BUFFER_OVERFLOW(image, 1, end))
@@ -305,7 +305,7 @@ H5F__cache_superblock_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
/* Set the initial image length size */
*image_len = H5F_SUPERBLOCK_FIXED_SIZE + /* Fixed size of superblock */
@@ -333,11 +333,11 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len,
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
- HDassert(image_len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
+ assert(image_len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
/* Deserialize the file superblock's prefix */
if (H5F__superblock_prefix_decode(&sblock, &image, image_len, udata, TRUE) < 0)
@@ -375,8 +375,8 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* No checksum for version 0 & 1 */
if (udata->super_vers >= HDF5_SUPERBLOCK_VERSION_2) {
@@ -411,10 +411,10 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
+ assert(len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
/* Allocate space for the superblock */
if (NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
@@ -632,10 +632,10 @@ H5F__cache_superblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(sblock);
- HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK);
- HDassert(image_len);
+ assert(sblock);
+ assert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sblock->cache_info.type == H5AC_SUPERBLOCK);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5F_SUPERBLOCK_SIZE(sblock);
@@ -661,15 +661,15 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(sblock);
+ assert(f);
+ assert(image);
+ assert(sblock);
/* Assert that the superblock is marked as being flushed last (and
collectively in parallel) */
/* (We'll rely on the cache to make sure it actually *is* flushed
last (and collectively in parallel), but this check doesn't hurt) */
- HDassert(sblock->cache_info.flush_me_last);
+ assert(sblock->cache_info.flush_me_last);
/* Encode the common portion of the file superblock for all versions */
H5MM_memcpy(image, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN);
@@ -764,11 +764,11 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
UINT32ENCODE(image, chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == (size_t)H5F_SUPERBLOCK_SIZE(sblock));
+ assert((size_t)(image - (uint8_t *)_image) == (size_t)H5F_SUPERBLOCK_SIZE(sblock));
}
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -795,9 +795,9 @@ H5F__cache_superblock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(sblock);
- HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK);
+ assert(sblock);
+ assert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(sblock->cache_info.type == H5AC_SUPERBLOCK);
/* Destroy superblock */
if (H5F__super_free(sblock) < 0)
@@ -820,7 +820,7 @@ H5F__cache_drvrinfo_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *i
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
/* Set the initial image length size */
*image_len = H5F_DRVINFOBLOCK_HDR_SIZE; /* Fixed size portion of driver info block */
@@ -847,11 +847,11 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, vo
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
- HDassert(image_len == H5F_DRVINFOBLOCK_HDR_SIZE);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
+ assert(image_len == H5F_DRVINFOBLOCK_HDR_SIZE);
/* Deserialize the file driver info's prefix */
if (H5F__drvrinfo_prefix_decode(&drvrinfo, NULL, &image, image_len, udata, TRUE) < 0)
@@ -884,10 +884,10 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len >= H5F_DRVINFOBLOCK_HDR_SIZE);
- HDassert(udata);
- HDassert(udata->f);
+ assert(image);
+ assert(len >= H5F_DRVINFOBLOCK_HDR_SIZE);
+ assert(udata);
+ assert(udata->f);
/* Allocate space for the driver info */
if (NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t))))
@@ -898,14 +898,14 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file driver info prefix")
/* Sanity check */
- HDassert(len == (H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
+ assert(len == (H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
/* Validate and decode driver information */
if (H5FD_sb_load(udata->f->shared->lf, drv_name, image) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "unable to decode driver information")
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
ret_value = drvinfo;
@@ -932,10 +932,10 @@ H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
- HDassert(image_len);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + /* Fixed-size portion of driver info block */
@@ -962,12 +962,12 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
- HDassert(len == (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
+ assert(f);
+ assert(image);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(len == (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
/* Save pointer to beginning of driver info */
dbuf = image;
@@ -989,7 +989,7 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU
image += 8 + drvinfo->len;
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1015,9 +1015,9 @@ H5F__cache_drvrinfo_free_icr(void *_thing)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
/* Destroy driver info message */
H5MM_xfree(drvinfo);