summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-05-01 02:23:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-05-01 02:23:13 (GMT)
commit1bc43aeb519303b69d17860d8bc56fc949314c4d (patch)
tree96d0537a41db683e011f0f3b115f77377195aa7d /src
parenta13d291aff423e3be493de447fff001d6afd357a (diff)
downloadhdf5-1bc43aeb519303b69d17860d8bc56fc949314c4d.zip
hdf5-1bc43aeb519303b69d17860d8bc56fc949314c4d.tar.gz
hdf5-1bc43aeb519303b69d17860d8bc56fc949314c4d.tar.bz2
[svn-r8452] Purpose:
Code optimization Description: Eliminate frivolous 64-bit multiply. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.9 (sleipnir) too minor to require h5committest
Diffstat (limited to 'src')
-rw-r--r--src/H5Shyper.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index e6bf352..ba68583 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -1689,23 +1689,19 @@ H5S_hyper_is_valid (const H5S_t *space)
for(u=0; u<space->extent.u.simple.rank; u++) {
/* if block or count is zero, then can skip the test since */
/* no data point is chosen */
- if (diminfo[u].count*diminfo[u].block != 0) {
+ if (diminfo[u].count && diminfo[u].block) {
/* Bounds check the start point in this dimension */
if((diminfo[u].start+space->select.offset[u])<0 ||
- (diminfo[u].start+space->select.offset[u])>=(hssize_t)space->extent.u.simple.size[u]) {
- ret_value=FALSE;
- break;
- } /* end if */
+ (diminfo[u].start+space->select.offset[u])>=(hssize_t)space->extent.u.simple.size[u])
+ HGOTO_DONE(FALSE)
/* Compute the largest location in this dimension */
end=diminfo[u].start+diminfo[u].stride*(diminfo[u].count-1)+(diminfo[u].block-1)+space->select.offset[u];
/* Bounds check the end point in this dimension */
- if(end<0 || end>=(hssize_t)space->extent.u.simple.size[u]) {
- ret_value=FALSE;
- break;
- } /* end if */
- }
+ if(end<0 || end>=(hssize_t)space->extent.u.simple.size[u])
+ HGOTO_DONE(FALSE)
+ } /* end if */
} /* end for */
} /* end if */
else {