From 61667c35e085fe64b27a7ccfd5f0593fad0f3a13 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 30 Apr 2004 21:21:35 -0500 Subject: [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 --- src/H5Shyper.c | 16 ++++++---------- 1 file 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; uextent.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 { -- cgit v0.12