diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2018-04-30 22:22:09 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2018-04-30 22:22:09 (GMT) |
commit | 64e13ca220a8d99e2282b680a852a038dd217d60 (patch) | |
tree | e3764cc9ce69e6f8ba684ed071c430e489577f06 /src/H5Dchunk.c | |
parent | 3313fde3bb8b6cc5cfa3c8401615ac064f7cbdf9 (diff) | |
parent | 1f8cb03e11a46f853881f45dac18eff2dd68401e (diff) | |
download | hdf5-64e13ca220a8d99e2282b680a852a038dd217d60.zip hdf5-64e13ca220a8d99e2282b680a852a038dd217d60.tar.gz hdf5-64e13ca220a8d99e2282b680a852a038dd217d60.tar.bz2 |
Merge branch 'develop' into h5do_direct_chunk_hl_to_src
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r-- | src/H5Dchunk.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index c62f201..7216c49 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1063,7 +1063,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf * additions involving the offset and the hyperslab selection -QAK) */ if((file_space_normalized = H5S_hyper_normalize_offset((H5S_t *)file_space, old_offset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to normalize selection") /* Decide the number of chunks in each dimension*/ for(u = 0; u < f_ndims; u++) { @@ -1298,10 +1298,10 @@ done: HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator") if(file_type && (H5T_close_real(file_type) < 0)) HDONE_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "Can't free temporary datatype") - if(file_space_normalized) { + if(file_space_normalized == TRUE) { /* (Casting away const OK -QAK) */ if(H5S_hyper_denormalize_offset((H5S_t *)file_space, old_offset) < 0) - HDONE_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") + HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't denormalize selection") } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -1501,8 +1501,7 @@ H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file selection") /* Move selection back to have correct offset in chunk */ - if(H5S_SELECT_ADJUST_U(fm->single_space, coords) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection") + H5S_SELECT_ADJUST_U(fm->single_space, coords); #ifdef H5_HAVE_PARALLEL /* store chunk selection information */ @@ -1614,10 +1613,7 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t } /* end if */ /* Move selection back to have correct offset in chunk */ - if(H5S_SELECT_ADJUST_U(tmp_fchunk, coords) < 0) { - (void)H5S_close(tmp_fchunk); - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection") - } /* end if */ + H5S_SELECT_ADJUST_U(tmp_fchunk, coords); /* Add temporary chunk to the list of chunks */ @@ -1816,8 +1812,8 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm) } /* end for */ /* Adjust the selection */ - if(H5S_hyper_adjust_s(chunk_info->mspace,chunk_adjust) < 0) /*lint !e772 The chunk_adjust array will always be initialized */ - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection") + if(H5S_hyper_adjust_s(chunk_info->mspace, chunk_adjust) < 0) /*lint !e772 The chunk_adjust array will always be initialized */ + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to adjust selection") /* Get the next chunk node in the skip list */ curr_node=H5SL_next(curr_node); |