summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-22 22:42:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-22 22:42:21 (GMT)
commitfe6cf16d94aeface4e429660142b243f471f8fbb (patch)
tree84c9fa296ad75a00eec67022737003b12d3ccf7f /src
parentd0859bb17474d05e87eb9cbf3ccfd28c92c84185 (diff)
downloadhdf5-fe6cf16d94aeface4e429660142b243f471f8fbb.zip
hdf5-fe6cf16d94aeface4e429660142b243f471f8fbb.tar.gz
hdf5-fe6cf16d94aeface4e429660142b243f471f8fbb.tar.bz2
[svn-r15681] Description:
Correct small error in allocating data block elements and add some more tests. Tested on: Mac OS X/32 10.5.4 (amazon) in debug mode Mac OS X/32 10.5.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src')
-rw-r--r--src/H5EAhdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index a49116f..5fcf2be 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -265,7 +265,7 @@ HDfprintf(stderr, "%s: nelmts = %Zu, hdr->data_blk_min_elmts = %u, idx = %u\n",
/* Check for needing to increase size of array of factories */
if(idx >= hdr->elmt_fac.nalloc) {
H5FL_fac_head_t **new_fac; /* New array of element factories */
- size_t new_nalloc = MAX(1, (2 * hdr->elmt_fac.nalloc)); /* New number of factories allocated */
+ size_t new_nalloc = MAX3(1, (idx + 1), (2 * hdr->elmt_fac.nalloc)); /* New number of factories allocated */
/* Re-allocate array of element factories */
if(NULL == (new_fac = H5FL_SEQ_REALLOC(H5FL_fac_head_ptr_t, hdr->elmt_fac.fac, new_nalloc)))