diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-02 05:06:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-02 05:06:18 (GMT) |
commit | 0611a912634742279a12fe34494cfb239466bc6b (patch) | |
tree | eedce6c4c954c2015cfc245a5271e58d2e6dfd23 /src/H5FAdblock.c | |
parent | ff1c084a4ff54b6eb50d909b29c6e6b1301d0f8d (diff) | |
download | hdf5-0611a912634742279a12fe34494cfb239466bc6b.zip hdf5-0611a912634742279a12fe34494cfb239466bc6b.tar.gz hdf5-0611a912634742279a12fe34494cfb239466bc6b.tar.bz2 |
[svn-r18504] Description:
Streamline & cleanup data structure 'destroy' calls from metadata
client destroy callbacks.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) 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 debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Diffstat (limited to 'src/H5FAdblock.c')
-rw-r--r-- | src/H5FAdblock.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c index f564fee..d2ab5d9 100644 --- a/src/H5FAdblock.c +++ b/src/H5FAdblock.c @@ -166,7 +166,7 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr, hsize_t nelmts)) CATCH if(!ret_value) - if(dblock && H5FA__dblock_dest(hdr->f, dblock) < 0) + if(dblock && H5FA__dblock_dest(dblock) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block") END_FUNC(PKG) /* end H5FA__dblock_alloc() */ @@ -243,7 +243,7 @@ CATCH H5E_THROW(H5E_CANTFREE, "unable to release fixed array data block") /* Destroy data block */ - if(H5FA__dblock_dest(hdr->f, dblock) < 0) + if(H5FA__dblock_dest(dblock) < 0) H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block") } /* end if */ @@ -401,10 +401,9 @@ END_FUNC(PKG) /* end H5FA__dblock_delete() */ * *------------------------------------------------------------------------- */ -/* ARGSUSED */ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, -H5FA__dblock_dest(H5F_t UNUSED *f, H5FA_dblock_t *dblock)) +H5FA__dblock_dest(H5FA_dblock_t *dblock)) /* Sanity check */ HDassert(dblock); @@ -415,8 +414,7 @@ H5FA__dblock_dest(H5F_t UNUSED *f, H5FA_dblock_t *dblock)) if(dblock->elmts && !dblock->npages) { /* Free buffer for data block elements */ HDassert(dblock->hdr->cparam.nelmts > 0); - (void) H5FL_BLK_FREE(chunk_elmts, dblock->elmts); - dblock->elmts = NULL; + dblock->elmts = H5FL_BLK_FREE(chunk_elmts, dblock->elmts); } /* end if */ /* Check if data block is paged */ @@ -434,7 +432,7 @@ H5FA__dblock_dest(H5F_t UNUSED *f, H5FA_dblock_t *dblock)) } /* end if */ /* Free the data block itself */ - (void)H5FL_FREE(H5FA_dblock_t, dblock); + dblock = H5FL_FREE(H5FA_dblock_t, dblock); CATCH |