diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-05-27 18:30:22 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-05-27 18:30:22 (GMT) |
commit | 6bd725cec32a1d173707402e3815b7c1bccd00e0 (patch) | |
tree | f130fc6aa03f210901fca9d9cc3e616041f4259f /src/H5O.c | |
parent | 4f4902d0830cca2cb9d175f8510d5c4d673794d5 (diff) | |
download | hdf5-6bd725cec32a1d173707402e3815b7c1bccd00e0.zip hdf5-6bd725cec32a1d173707402e3815b7c1bccd00e0.tar.gz hdf5-6bd725cec32a1d173707402e3815b7c1bccd00e0.tar.bz2 |
[svn-r16987] Description:
Bring r16986 from trunk to 1.8 branch:
Clean up formatting & error reporting.
Tested on:
Mac OS X/32 10.5.7 (amazon)
(h5committest done on trunk)
Diffstat (limited to 'src/H5O.c')
-rw-r--r-- | src/H5O.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -1580,20 +1580,17 @@ H5O_protect(H5O_loc_t *loc, hid_t dxpl_id) /* Lock the object header into the cache */ if(NULL == (ret_value = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, NULL, NULL, H5AC_WRITE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header") /* Mark object header as un-evictable */ - if(H5AC_pin_protected_entry(loc->file, ret_value) < 0) { - if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, ret_value, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_OHDR, H5E_PROTECT, NULL, "unable to release object header") - + if(H5AC_pin_protected_entry(loc->file, ret_value) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, NULL, "unable to pin object header") - } /* end if */ +done: /* Release the object header from the cache */ if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, ret_value, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_PROTECT, NULL, "unable to release object header") -done: + HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header") + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_protect() */ |