summaryrefslogtreecommitdiffstats
path: root/src/H5HLcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HLcache.c')
-rw-r--r--src/H5HLcache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index a3c43ac..6576284 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -258,6 +258,7 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
size_t spec_read_size; /* Size of buffer to speculatively read in */
const uint8_t *p; /* Pointer into decoding buffer */
haddr_t eoa; /* Relative end of file address */
+ hsize_t min; /* temp min value to avoid macro nesting */
H5HL_prfx_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -276,7 +277,8 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, NULL, "unable to determine file size")
/* Compute the size of the speculative local heap prefix buffer */
- H5_ASSIGN_OVERFLOW(spec_read_size, MIN(eoa - addr, H5HL_SPEC_READ_SIZE), /* From: */ hsize_t, /* To: */ size_t);
+ min = MIN(eoa - addr, H5HL_SPEC_READ_SIZE);
+ H5_CHECKED_ASSIGN(spec_read_size, size_t, min, hsize_t);
HDassert(spec_read_size >= udata->sizeof_prfx);
/* Attempt to speculatively read both local heap prefix and heap data */