summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-07-28 00:32:01 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-07-28 00:32:01 (GMT)
commit91f5320ff0e9579d47f5d91bcd80de40c30c166f (patch)
tree4180286f3098314a025b644f90738c9fba270023 /src/H5S.c
parent74e09473c825610d203565e5ed9deb156256d6ea (diff)
downloadhdf5-91f5320ff0e9579d47f5d91bcd80de40c30c166f.zip
hdf5-91f5320ff0e9579d47f5d91bcd80de40c30c166f.tar.gz
hdf5-91f5320ff0e9579d47f5d91bcd80de40c30c166f.tar.bz2
Updates H5Sset_extent_none() to set H5S_NULL
The API call used to set the internal H5S_NO_CLASS value which produced errors when such a dataspace was passed to many other API calls. Fixes HDFFV-11027
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5S.c b/src/H5S.c
index bea86ca..7e48076 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -437,6 +437,9 @@ H5S__extent_release(H5S_extent_t *extent)
extent->max = H5FL_ARR_FREE(hsize_t, extent->max);
} /* end if */
+ extent->rank = 0;
+ extent->nelem = 0;
+
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__extent_release() */
@@ -1832,7 +1835,7 @@ done:
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
- This function resets the type of a dataspace back to "none" with no
+ This function resets the type of a dataspace to H5S_NULL with no
extent information stored for the dataspace.
--------------------------------------------------------------------------*/
herr_t
@@ -1852,7 +1855,7 @@ H5Sset_extent_none(hid_t space_id)
if(H5S__extent_release(&space->extent) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTDELETE, FAIL, "can't release previous dataspace")
- space->extent.type = H5S_NO_CLASS;
+ space->extent.type = H5S_NULL;
done:
FUNC_LEAVE_API(ret_value)