summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-10-08 20:06:55 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-10-08 20:06:55 (GMT)
commit4c558700ab33934e7358483c5d20fea4823baf9e (patch)
tree4ff47fe527c87edaef7b83e564f9dfa1e643d6b1 /src/H5S.c
parente9f253c7567cf508a3d40b863dce6455f0c93fdb (diff)
parent9ed9762889fcd05dc230d6652b92fddc5ec880a4 (diff)
downloadhdf5-4c558700ab33934e7358483c5d20fea4823baf9e.zip
hdf5-4c558700ab33934e7358483c5d20fea4823baf9e.tar.gz
hdf5-4c558700ab33934e7358483c5d20fea4823baf9e.tar.bz2
Merge pull request #1931 in HDFFV/hdf5 from feature/references to develop
* commit '9ed9762889fcd05dc230d6652b92fddc5ec880a4': Update RELEASE.txt for reference changes Fix reference type comparison in h5dump Make wrappers, tests and tools use H5Treclaim() instead of H5Dvlen_reclaim() Add new H5R API that abstracts object, region and attribute reference types Remove ability to loc by ref from H5VL layer Add support for retrieving object name by token Add H5VL_OBJECT_GET_TYPE to get object type Add H5VL_MAX_TOKEN_SIZE and H5VL_token_t Adapt Jerome's "file info" H5VL 'get' query to retrieve container token info. Fix H5VL_blob_get to return size of blob Add 'blob' callbacks to VOL, along with a native implementation to store them in the global heap, and changed the VL datatype conversion code to use blobs.
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 6018798..ddfd064 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1357,7 +1357,6 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims,
/* Check args */
HDassert(rank <= H5S_MAX_RANK);
- HDassert(0 == rank || dims);
/* shift out of the previous state to a "simple" dataspace. */
if(H5S__extent_release(&space->extent) < 0)
@@ -1378,7 +1377,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims,
space->extent.size = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)rank);
/* Copy the dimensions & compute the number of elements in the extent */
- for(u = 0, nelem = 1; u < space->extent.rank; u++) {
+ for(u = 0, nelem = 1; dims && (u < space->extent.rank); u++) {
space->extent.size[u] = dims[u];
nelem *= dims[u];
} /* end for */
@@ -1390,7 +1389,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims,
if(max != NULL)
H5MM_memcpy(space->extent.max, max, sizeof(hsize_t) * rank);
else
- for(u = 0; u < space->extent.rank; u++)
+ for(u = 0; dims && (u < space->extent.rank); u++)
space->extent.max[u] = dims[u];
} /* end else */