diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-12-15 01:06:25 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-12-15 01:06:25 (GMT) |
commit | 22bc8ba7bfb2c82b6cea6b5f5d1da2f2119c348b (patch) | |
tree | a15437bcf06df4a5c30b924fbcd7be135c992037 /src/H5D.c | |
parent | 1cffc3ff0f3454fedf6edcdb93dcde5ed1b910d6 (diff) | |
download | hdf5-22bc8ba7bfb2c82b6cea6b5f5d1da2f2119c348b.zip hdf5-22bc8ba7bfb2c82b6cea6b5f5d1da2f2119c348b.tar.gz hdf5-22bc8ba7bfb2c82b6cea6b5f5d1da2f2119c348b.tar.bz2 |
Addressed HDFFV-10661
Description:
- Fixed a bug triggered by tests in chunk_info.c. The returned value
from a callback function was not checked in H5EA_iterate(), H5FA_iterate(),
and H5D__none_idx_iterate(). This oversight caused a callback function
to continue iterating even though it's supposed to stop. Vailin confirmed.
- Addressed review comments and made various improvements on the tests.
Platforms tested:
Linux/64 (jelly)
Linux/64 (platypus)
Darwin (osx1010test)
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1190,7 +1190,7 @@ done: * Parameters: * hid_t dset_id; IN: Chunked dataset ID * hid_t fspace_id; IN: File dataspace ID - * hsize_t index; IN: Index of written chunk + * hsize_t chk_idx; IN: Index of allocated/written chunk * hsize_t *offset OUT: Offset coordinates of the chunk * unsigned *filter_mask OUT: Filter mask * haddr_t *addr OUT: Address of the chunk @@ -1204,14 +1204,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t index, hsize_t *offset, unsigned *filter_mask, haddr_t *addr, hsize_t *size) +H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_idx, hsize_t *offset, unsigned *filter_mask, haddr_t *addr, hsize_t *size) { H5D_t *dset = NULL; const H5S_t *space; /* Dataspace for dataset */ herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) - H5TRACE7("e", "iih*h*Iu*a*h", dset_id, fspace_id, index, offset, filter_mask, + H5TRACE7("e", "iih*h*Iu*a*h", dset_id, fspace_id, chk_idx, offset, filter_mask, addr, size); /* Check arguments */ @@ -1226,7 +1226,7 @@ H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t index, hsize_t *offset HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") /* Call private function to get the chunk info given the chunk's index */ - if(H5D__get_chunk_info(dset, space, index, offset, filter_mask, addr, size) < 0) + if(H5D__get_chunk_info(dset, space, chk_idx, offset, filter_mask, addr, size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info") done: @@ -1242,7 +1242,7 @@ done: * * Parameters: * hid_t dset_id IN: Chunked dataset ID - * hsize_t *offset IN: Coordinates of the chunk + * hsize_t *offset IN: Offset coordinates of the chunk * unsigned *filter_mask OUT: Filter mask * haddr_t *addr OUT: Address of the chunk * hsize_t *size OUT: Size of the chunk |