diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-08-07 16:15:39 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-08-07 16:15:39 (GMT) |
commit | 98f947ceaedbae472efbebad505680d2ca62b403 (patch) | |
tree | 21146ddcd7fd224d9f68bccc9824aa082eb9c205 /src/H5S.c | |
parent | bfd13897f6dcfddce253c6a5463cb9f53b927800 (diff) | |
download | hdf5-98f947ceaedbae472efbebad505680d2ca62b403.zip hdf5-98f947ceaedbae472efbebad505680d2ca62b403.tar.gz hdf5-98f947ceaedbae472efbebad505680d2ca62b403.tar.bz2 |
[svn-r27479] Add checking for invalid inputs to H5Dset_virtual: point selections, incorrect
numbers of elements selected, incorrect "slice" through limited dimensions,
incorrect number of printf substitutions.
Patch source selection space extent with bounds of selection if extent is
unknown before returning via H5Pget_virtual_srcspace.
Write updated VDS dataspace to file when it changes due to unlimited selections.
Other minor fixes/cleanup.
Tested: ummon
Diffstat (limited to 'src/H5S.c')
-rw-r--r-- | src/H5S.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1268,7 +1268,7 @@ H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/], } /* Do it */ - if (H5S__set_extent_simple(space, (unsigned)rank, dims, max)<0) + if (H5S_set_extent_simple(space, (unsigned)rank, dims, max)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent") done: @@ -1277,7 +1277,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5S__set_extent_simple + * Function: H5S_set_extent_simple * * Purpose: This is where the real work happens for * H5Sset_extent_simple(). @@ -1292,13 +1292,13 @@ done: *------------------------------------------------------------------------- */ herr_t -H5S__set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, +H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hsize_t *max) { unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE + FUNC_ENTER_NOAPI(FAIL) /* Check args */ HDassert(rank <= H5S_MAX_RANK); @@ -1354,7 +1354,7 @@ H5S__set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5S__set_extent_simple() */ +} /* H5S_set_extent_simple() */ /*------------------------------------------------------------------------- @@ -1465,7 +1465,7 @@ H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], /* Create the space and set the extent */ if(NULL==(ret_value=H5S_create(H5S_SIMPLE))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace") - if(H5S__set_extent_simple(ret_value,rank,dims,maxdims)<0) + if(H5S_set_extent_simple(ret_value,rank,dims,maxdims)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't set dimensions") done: |