summaryrefslogtreecommitdiffstats
path: root/src/H5HFman.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-12-06 22:19:52 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-12-06 22:19:52 (GMT)
commit7b368f006eea17a8b08cac9e6e79e58977edf864 (patch)
tree99e0f328dab0a6c3e602684d94aad309f339498d /src/H5HFman.c
parent1fa6d7cbf7062f12bdd85f896d40004f562cc439 (diff)
downloadhdf5-7b368f006eea17a8b08cac9e6e79e58977edf864.zip
hdf5-7b368f006eea17a8b08cac9e6e79e58977edf864.tar.gz
hdf5-7b368f006eea17a8b08cac9e6e79e58977edf864.tar.bz2
[svn-r13028] Description:
Add first pass of "dense" attribute storage to objects. Lots of parts of this are stubbed out, but all the tests are passing and I'll work on the corner cases soon. Eliminated several unused parameters from object header message callback routines. Other, miscellaneous code cleanups, etc. (and probably some things I've forgotten about... :-) Tested on: FreeBSD/32 4.11 (sleipnir) Linux/32 2.4 (heping) AIX/32 5.? (copper)
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r--src/H5HFman.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c
index 56f24ca..6270905 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -248,7 +248,7 @@ static herr_t
H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
H5HF_operator_t op, void *op_data)
{
- H5HF_direct_t *dblock; /* Pointer to direct block to query */
+ H5HF_direct_t *dblock = NULL; /* Pointer to direct block to query */
hsize_t obj_off; /* Object's offset in heap */
size_t obj_len; /* Object's length in heap */
size_t blk_off; /* Offset of object in block */
@@ -360,20 +360,14 @@ HDfprintf(stderr, "%s: dblock_addr = %a, dblock_size = %Zu\n", FUNC, dblock_addr
p = dblock->blk + blk_off;
/* Call the user's 'op' callback */
- if(op(p, obj_len, op_data) < 0) {
- /* Release direct block */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block")
-
+ if(op(p, obj_len, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed")
- } /* end if */
+done:
/* Unlock direct block */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block")
- dblock = NULL;
+ if(dblock && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block")
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_op_real() */