summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-08-18 17:14:43 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-08-18 17:14:43 (GMT)
commitd27a31461c69001551b1168c3ca44b591f4cb82b (patch)
treebac2fc1ea06c6ab1052c0eab083c87769ac79c3f /src/H5Shyper.c
parentd9b9ed853d6b5d53935efad83d932f58ef0a5ac3 (diff)
downloadhdf5-d27a31461c69001551b1168c3ca44b591f4cb82b.zip
hdf5-d27a31461c69001551b1168c3ca44b591f4cb82b.tar.gz
hdf5-d27a31461c69001551b1168c3ca44b591f4cb82b.tar.bz2
[svn-r601] Changes since 19980814
---------------------- ./src/H5Fistore.c Fixed a bug that caused the wrong number of chunk offsets to be read or written from the file. ./src/H5Z.c Fixed a memory bug. ./test/dtypes.c Removed redundant tests. ./bin/snapshot Removed Perl code from a shell script. Oops :-) ./src/H5D.c Removed cvs merge conflicts. ./src/H5Omtime.c Fixed a typo in the Irix5.3 code. ./src/H5S.c Fixed a memory leak. ./src/H5Shyper.c Fixed a bad call to malloc() that didn't allocate enough memory. Reordered a comparison to eliminate an array bounds read error.
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 7797ad7..fcfb171 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -300,8 +300,9 @@ H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count,
printf("%s: check 2.0.5, lo_bounds[%d][%d].bound=%d\n",FUNC,
(int)dim,(int)i,(int)lo_bounds[dim][i].bound);
#endif /* QAK */
- for(; pos[dim]>=(lo_bounds[dim][i].bound+offset[dim]) && i<bound_count; i++) {
-
+ for (/*void*/;
+ i<bound_count && pos[dim]>=lo_bounds[dim][i].bound+offset[dim];
+ i++) {
#ifdef QAK
printf("%s: check 2.1, i=%d, num_reg=%d, pos[%d]=%d\n",
FUNC,i,(int)num_reg,dim,(int)pos[dim]);
@@ -1875,7 +1876,8 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src)
printf("%s: check 3.0\n", FUNC);
#endif /* QAK */
/* Create the per-dimension selection info */
- if((new_diminfo = H5MM_malloc(sizeof(H5S_hyper_dim_t *)*src->extent.u.simple.rank))==NULL)
+ if((new_diminfo = H5MM_malloc(sizeof(H5S_hyper_dim_t)*
+ src->extent.u.simple.rank))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"can't allocate per-dimension array");