summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-08-10 18:02:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-08-10 18:02:57 (GMT)
commit908ce6d7214948e71dbeb01f129789c4c669861a (patch)
treeea4a31ea59fd8102c9abb66fb9cf72a1a1be8a43 /src/H5O.c
parentdb134c8627d6a1c295ca01dfa9ee87b7a9475b6e (diff)
downloadhdf5-908ce6d7214948e71dbeb01f129789c4c669861a.zip
hdf5-908ce6d7214948e71dbeb01f129789c4c669861a.tar.gz
hdf5-908ce6d7214948e71dbeb01f129789c4c669861a.tar.bz2
[svn-r17314] Description:
Bring r17313 from trunk to 1.8 branch: Bring back various minor code cleanups from the file free space branch 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 (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 Mac OS X/32 10.5.8 (amazon) in debug mode Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/H5O.c b/src/H5O.c
index 2017e1c..64d0b9b 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1449,11 +1449,12 @@ H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, unsigned *oh_flags)
*oh_flags = H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
} /* end else */
} /* end if */
- } else {
+ } /* end if */
+ else {
/* A new object, or one that will be deleted */
- if(oh->nlink == 0) {
- /* Check if the object is current open, but marked for deletion */
- if(H5FO_marked(f, addr) > 0) {
+ if(0 == oh->nlink) {
+ /* Check if the object is currently open, but marked for deletion */
+ if(H5FO_marked(f, addr)) {
/* Remove "delete me" flag on the object */
if(H5FO_mark(f, addr, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't mark object for deletion")
@@ -1496,7 +1497,7 @@ H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, unsigned *oh_flags)
} /* end if */
/* Set return value */
- ret_value = oh->nlink;
+ ret_value = (int)oh->nlink;
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -2934,5 +2935,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_visit() */
-
-