summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-06-14 19:23:06 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-06-14 19:23:06 (GMT)
commitbb9370d777b645b9f0e2f5090421b63e207aa50f (patch)
tree932aa5b7867b332c854faed4e308abf4e265a5cf /src/H5Sselect.c
parentd5a8b2a80cd1e5aaa62a523e03a5936260a56f60 (diff)
parent57d5c207d94bf876c934094cc7193858590a2c9f (diff)
downloadhdf5-bb9370d777b645b9f0e2f5090421b63e207aa50f.zip
hdf5-bb9370d777b645b9f0e2f5090421b63e207aa50f.tar.gz
hdf5-bb9370d777b645b9f0e2f5090421b63e207aa50f.tar.bz2
Merge branch 'develop' into vol_dev_headers
Also moved the wrapper functions from the H5VLconnector.h to H5VLconnector_passthru.h
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 80b5ea1..6983c93 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -2374,10 +2374,11 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
if(H5S_select_copy(new_space, dst_space, FALSE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination space selection")
} /* end if */
- /* If any of the spaces are "none", the projection must also be "none" */
- else if((src_intersect_space->select.type->type == H5S_SEL_NONE)
- || (src_space->select.type->type == H5S_SEL_NONE)
- || (dst_space->select.type->type == H5S_SEL_NONE)) {
+ /* If any of the selections contain no elements, the projection must be
+ * "none" */
+ else if((H5S_GET_SELECT_NPOINTS(src_intersect_space) == 0)
+ || (H5S_GET_SELECT_NPOINTS(src_space) == 0)
+ || (H5S_GET_SELECT_NPOINTS(dst_space) == 0)) {
/* Change to "none" selection */
if(H5S_select_none(new_space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection")
@@ -2389,6 +2390,8 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "point selections not currently supported")
else {
HDassert(src_intersect_space->select.type->type == H5S_SEL_HYPERSLABS);
+ HDassert(src_space->select.type->type != H5S_SEL_NONE);
+ HDassert(dst_space->select.type->type != H5S_SEL_NONE);
/* Intersecting space is hyperslab selection. Call the hyperslab
* routine to project to another hyperslab selection. */