summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-27 23:10:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-27 23:10:02 (GMT)
commit2516911cad1e5f26aa92a6b153909b32a3645ac0 (patch)
treeb3003be2ba4d683bad5f54cc504c2b4832bdbebf /src/H5O.c
parent03c994ee5921d46c7332b494844e55432f7bde31 (diff)
downloadhdf5-2516911cad1e5f26aa92a6b153909b32a3645ac0.zip
hdf5-2516911cad1e5f26aa92a6b153909b32a3645ac0.tar.gz
hdf5-2516911cad1e5f26aa92a6b153909b32a3645ac0.tar.bz2
[svn-r12988] Description:
General cleanups, in preparation for adding some attribute-tracking fields to the object header prefix. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5O.c b/src/H5O.c
index ff4e5a3..0ef5b43 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1299,7 +1299,8 @@ H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id)
/* adjust link count */
if(adjust < 0) {
- if(oh->nlink + adjust < 0)
+ /* Check for too large of an adjustment */
+ if((unsigned)(-adjust) > oh->nlink)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "link count would be negative")
oh->nlink += adjust;
oh_flags |= H5AC__DIRTIED_FLAG;