summaryrefslogtreecommitdiffstats
path: root/src/H5VLnative_dataset.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2019-09-01 06:13:08 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2019-09-01 06:13:08 (GMT)
commitb679d11bccb5ff5b8460871079c4e36126d96fa4 (patch)
treef75e488610e7747ae24ebd9b73ac28483f197f96 /src/H5VLnative_dataset.c
parenta633e333346eef38bf689b6a8edb817c732298c0 (diff)
downloadhdf5-b679d11bccb5ff5b8460871079c4e36126d96fa4.zip
hdf5-b679d11bccb5ff5b8460871079c4e36126d96fa4.tar.gz
hdf5-b679d11bccb5ff5b8460871079c4e36126d96fa4.tar.bz2
Updated based on reviews and refactored test code
Diffstat (limited to 'src/H5VLnative_dataset.c')
-rw-r--r--src/H5VLnative_dataset.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c
index 631eb19..4f7f2b5 100644
--- a/src/H5VLnative_dataset.c
+++ b/src/H5VLnative_dataset.c
@@ -509,15 +509,12 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
dset = (H5D_t *)obj;
HDassert(dset);
HDassert(dset->shared);
+ HDassert(dset->shared->space);
/* When default dataspace is given, use the dataset's dataspace */
if(space_id == H5S_ALL)
- {
space = dset->shared->space;
- if(NULL == space)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to obtain a dataspace")
- } /* otherwise, use the given space ID */
- else
+ else /* otherwise, use the given space ID */
if(NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid dataspace ID")