diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-05-18 15:03:27 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-05-18 15:03:27 (GMT) |
commit | bcea2068905e02e4d209f105dac7d61ea56b6b35 (patch) | |
tree | 30d03c845dbdd1d0744394f2dd0997215323fa43 /src/H5HLcache.c | |
parent | 1f85a96f3eadda5ab08ef24008947e6f63c0baa8 (diff) | |
download | hdf5-bcea2068905e02e4d209f105dac7d61ea56b6b35.zip hdf5-bcea2068905e02e4d209f105dac7d61ea56b6b35.tar.gz hdf5-bcea2068905e02e4d209f105dac7d61ea56b6b35.tar.bz2 |
[svn-r27099] Merge of r27045 from trunk
Renamed H5_ASSIGN_OVERFLOW() to H5_CHECKED_ASSIGN() and re-ordered
the arguments to be in a more logical order.
Fixes HDFFV-9322
Tested on: h5committest
Diffstat (limited to 'src/H5HLcache.c')
-rw-r--r-- | src/H5HLcache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5HLcache.c b/src/H5HLcache.c index aadae11..6a1592e 100644 --- a/src/H5HLcache.c +++ b/src/H5HLcache.c @@ -256,6 +256,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 @@ -274,7 +275,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 */ |