summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-11-01 18:39:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-11-01 18:39:20 (GMT)
commitba751a6a4c23bd0c53625e53f67562f5b4af00b4 (patch)
tree2afd6751bcb6e7eca02611463e16b05e3626287b /src/H5Sselect.c
parent23457df13df32e1db53b3ce36abd2ef7ad6d0494 (diff)
downloadhdf5-ba751a6a4c23bd0c53625e53f67562f5b4af00b4.zip
hdf5-ba751a6a4c23bd0c53625e53f67562f5b4af00b4.tar.gz
hdf5-ba751a6a4c23bd0c53625e53f67562f5b4af00b4.tar.bz2
[svn-r6047] Purpose:
Bug fix & code cleanup Description: Hyperslab code for collapsing dimensions was incorrectly collapsing selections inappropriately when the fastest changing dimension couldn't be collapsed. Also add some more assertions which will make similar bugs easier to find. Solution: Break out of loop earlier. Platforms tested: modi4 (parallel), too small to triple check.
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index fca9132..0fb429e 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -803,6 +803,7 @@ H5S_select_fscat (H5F_t *f, struct H5O_layout_t *layout,
assert (iter);
assert (nelmts>0);
assert (_buf);
+ assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER));
/* Get the hyperslab vector size */
if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
@@ -1165,6 +1166,11 @@ H5S_select_read(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist,
FUNC_ENTER_NOAPI(H5S_select_read, FAIL);
+ /* Check args */
+ assert(f);
+ assert(_buf);
+ assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER));
+
/* Get the hyperslab vector size */
if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list");
@@ -1395,6 +1401,11 @@ H5S_select_write(H5F_t *f, H5O_layout_t *layout, H5P_genplist_t *dc_plist,
FUNC_ENTER_NOAPI(H5S_select_write, FAIL);
+ /* Check args */
+ assert(f);
+ assert(_buf);
+ assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER));
+
/* Get the hyperslab vector size */
if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list");