summaryrefslogtreecommitdiffstats
path: root/src/H5Fsuper_cache.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-05 21:52:30 (GMT)
committerGitHub <noreply@github.com>2023-09-05 21:52:30 (GMT)
commit8253ab9ebf6a082dc07eb931f27b169d6a45d577 (patch)
tree47630856491e54f5d28e1608ffa5e2f976dc9c95 /src/H5Fsuper_cache.c
parent920869796031ed4ee9c1fbea8aaccda3592a88b3 (diff)
downloadhdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.zip
hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.gz
hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.bz2
Convert hbool_t --> bool in src (#3496)
* hbool_t --> bool in src * Does not remove TRUE/FALSE * Public header files are unchanged * Public API calls are unchanged * TRUE/FALSE --> true/false in src * Add deprecation notice for hbool_t
Diffstat (limited to 'src/H5Fsuper_cache.c')
-rw-r--r--src/H5Fsuper_cache.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 0e4b02a..e62cc47 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -60,7 +60,7 @@ static herr_t H5F__cache_superblock_get_initial_load_size(void *udata, size_t *i
static herr_t H5F__cache_superblock_get_final_load_size(const void *image_ptr, size_t image_len, void *udata,
size_t *actual_len);
static htri_t H5F__cache_superblock_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5F__cache_superblock_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5F__cache_superblock_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5F__cache_superblock_image_len(const void *thing, size_t *image_len);
static herr_t H5F__cache_superblock_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5F__cache_superblock_free_icr(void *thing);
@@ -68,16 +68,16 @@ static herr_t H5F__cache_superblock_free_icr(void *thing);
static herr_t H5F__cache_drvrinfo_get_initial_load_size(void *udata, size_t *image_len);
static herr_t H5F__cache_drvrinfo_get_final_load_size(const void *image_ptr, size_t image_len, void *udata,
size_t *actual_len);
-static void *H5F__cache_drvrinfo_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5F__cache_drvrinfo_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5F__cache_drvrinfo_image_len(const void *thing, size_t *image_len);
static herr_t H5F__cache_drvrinfo_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5F__cache_drvrinfo_free_icr(void *thing);
/* Local encode/decode routines */
static herr_t H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, size_t len,
- const H5F_superblock_cache_ud_t *udata, hbool_t extend_eoa);
+ const H5F_superblock_cache_ud_t *udata, bool extend_eoa);
static herr_t H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvinfo, char *drv_name, const uint8_t **image_ref,
- size_t len, H5F_drvrinfo_cache_ud_t *udata, hbool_t extend_eoa);
+ size_t len, H5F_drvrinfo_cache_ud_t *udata, bool extend_eoa);
/*********************/
/* Package Variables */
@@ -140,7 +140,7 @@ H5FL_EXTERN(H5F_super_t);
*/
static herr_t
H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, size_t len,
- const H5F_superblock_cache_ud_t *udata, hbool_t extend_eoa)
+ const H5F_superblock_cache_ud_t *udata, bool extend_eoa)
{
const uint8_t *image = (const uint8_t *)*image_ref; /* Pointer into raw data buffer */
const uint8_t *end = image + len - 1; /* Pointer to end of buffer */
@@ -225,7 +225,7 @@ done:
*/
static herr_t
H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8_t **image_ref, size_t len,
- H5F_drvrinfo_cache_ud_t *udata, hbool_t extend_eoa)
+ H5F_drvrinfo_cache_ud_t *udata, bool extend_eoa)
{
const uint8_t *image = (const uint8_t *)*image_ref; /* Pointer into raw data buffer */
const uint8_t *end = image + len - 1; /* Pointer to end of buffer */
@@ -340,7 +340,7 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t 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)
+ if (H5F__superblock_prefix_decode(&sblock, &image, image_len, udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file superblock prefix");
/* Save the version to be used in verify_chksum callback */
@@ -360,7 +360,7 @@ done:
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*-------------------------------------------------------------------------
*/
@@ -371,7 +371,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -385,7 +385,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -401,7 +401,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5F_super_t *sblock = NULL; /* File's superblock */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
@@ -421,7 +421,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* Deserialize the file superblock's prefix */
- if (H5F__superblock_prefix_decode(sblock, &image, len, udata, FALSE) < 0)
+ if (H5F__superblock_prefix_decode(sblock, &image, len, udata, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file superblock prefix");
/* Check for older version of superblock format */
@@ -551,7 +551,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
if (udata->ignore_drvrinfo && H5_addr_defined(sblock->driver_addr)) {
/* Eliminate the driver info */
sblock->driver_addr = HADDR_UNDEF;
- udata->drvrinfo_removed = TRUE;
+ udata->drvrinfo_removed = true;
}
/* NOTE: Driver info block is decoded separately, later */
@@ -848,7 +848,7 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, vo
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)
+ if (H5F__drvrinfo_prefix_decode(&drvrinfo, NULL, &image, image_len, udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file driver info prefix");
/* Set the final size for the cache image */
@@ -868,7 +868,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
+H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATTR_UNUSED *dirty)
{
H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
H5F_drvrinfo_cache_ud_t *udata = (H5F_drvrinfo_cache_ud_t *)_udata; /* User data */
@@ -888,7 +888,7 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "memory allocation failed for driver info message");
/* Deserialize the file driver info's prefix */
- if (H5F__drvrinfo_prefix_decode(drvinfo, drv_name, &image, len, udata, FALSE) < 0)
+ if (H5F__drvrinfo_prefix_decode(drvinfo, drv_name, &image, len, udata, false) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file driver info prefix");
/* Sanity check */