summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-05-21 17:13:16 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-05-21 17:13:16 (GMT)
commit948722cde8db7f53866393ada4c08b88b2a91e3e (patch)
treeafbf15d2ff270b439b9c202d8a89c5d783871270 /src/H5S.c
parentf7e10b55ab75857e8a5bade01749842b060b5783 (diff)
parent194d647721cb4f71e6330d11c244b3d7db8309e7 (diff)
downloadhdf5-948722cde8db7f53866393ada4c08b88b2a91e3e.zip
hdf5-948722cde8db7f53866393ada4c08b88b2a91e3e.tar.gz
hdf5-948722cde8db7f53866393ada4c08b88b2a91e3e.tar.bz2
[svn-r27103] Merge revisions 26780 through 27102 from trunk to vds branch.
Tested: ummon
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 045ab51..4a4ed8d 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1564,7 +1564,7 @@ H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc)
/* Find out the size of buffer needed for selection */
if((sselect_size = H5S_SELECT_SERIAL_SIZE(f, obj)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size")
- H5_ASSIGN_OVERFLOW(select_size, sselect_size, hssize_t, size_t);
+ H5_CHECKED_ASSIGN(select_size, size_t, sselect_size, hssize_t);
/* Verify the size of buffer. If it's not big enough, simply return the
* right size without filling the buffer. */
@@ -2201,14 +2201,13 @@ H5S_extend(H5S_t *space, const hsize_t *size)
HDassert(size);
/* Check through all the dimensions to see if modifying the dataspace is allowed */
- for(u = 0; u < space->extent.rank; u++) {
- if(space->extent.size[u]<size[u]) {
- if(space->extent.max && H5S_UNLIMITED!=space->extent.max[u] &&
- space->extent.max[u]<size[u])
+ for(u = 0; u < space->extent.rank; u++)
+ if(space->extent.size[u] < size[u]) {
+ if(space->extent.max && H5S_UNLIMITED != space->extent.max[u] &&
+ space->extent.max[u] < size[u])
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dimension cannot be increased")
ret_value++;
} /* end if */
- } /* end for */
/* Update */
if(ret_value) {