diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-01 02:21:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-01 02:21:35 (GMT) |
commit | 61667c35e085fe64b27a7ccfd5f0593fad0f3a13 (patch) | |
tree | 5a4e0a6a7722d1c839d5d49170af1832bda58eb2 /src | |
parent | 32d4f1041ed2b58bc4970e228ea367f58ef5fa4c (diff) | |
download | hdf5-61667c35e085fe64b27a7ccfd5f0593fad0f3a13.zip hdf5-61667c35e085fe64b27a7ccfd5f0593fad0f3a13.tar.gz hdf5-61667c35e085fe64b27a7ccfd5f0593fad0f3a13.tar.bz2 |
[svn-r8451] 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.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c index b5cb330..6ee6fce 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -1684,23 +1684,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 { |