summaryrefslogtreecommitdiffstats
path: root/src/H5Dnone.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-12-15 01:06:25 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-12-15 01:06:25 (GMT)
commit22bc8ba7bfb2c82b6cea6b5f5d1da2f2119c348b (patch)
treea15437bcf06df4a5c30b924fbcd7be135c992037 /src/H5Dnone.c
parent1cffc3ff0f3454fedf6edcdb93dcde5ed1b910d6 (diff)
downloadhdf5-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/H5Dnone.c')
-rw-r--r--src/H5Dnone.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index be421b6..09e781e 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -242,7 +242,7 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info,
unsigned u; /* Local index variable */
int curr_dim; /* Current rank */
hsize_t idx; /* Array index of chunk */
- int ret_value = -1; /* Return value */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -266,7 +266,7 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info,
HDassert(ndims > 0);
/* Iterate over all the chunks in the dataset's dataspace */
- for(u = 0; u < idx_info->layout->nchunks; u++) {
+ for(u = 0; u < idx_info->layout->nchunks && ret_value == H5_ITER_CONT; u++) {
/* Calculate the index of this chunk */
idx = H5VM_array_offset_pre(ndims, idx_info->layout->max_down_chunks, chunk_rec.scaled);