summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
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) {