summaryrefslogtreecommitdiffstats
path: root/src/H5Gstab.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2012-07-05 22:18:56 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2012-07-05 22:18:56 (GMT)
commit2d3bf69c7702de797cb8e82b9f836253836d0059 (patch)
tree5a45d557252f5d7496ee29672ef55a7a62436700 /src/H5Gstab.c
parent35f98ad8b6612eb76e1f8d01ee42dd6527a82c48 (diff)
downloadhdf5-2d3bf69c7702de797cb8e82b9f836253836d0059.zip
hdf5-2d3bf69c7702de797cb8e82b9f836253836d0059.tar.gz
hdf5-2d3bf69c7702de797cb8e82b9f836253836d0059.tar.bz2
[svn-r22520] Made a few changes to error comparisons.
Tested on jam. This branch still has h5diff errors. The library tests all pass, though.
Diffstat (limited to 'src/H5Gstab.c')
-rw-r--r--src/H5Gstab.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index bbbbfcf..3312b84 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -152,20 +152,20 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t
HDassert(size_hint > 0);
/* Create the B-tree */
- if(H5B_create(f, dxpl_id, H5B_SNODE, NULL, NULL, &(stab->btree_addr)/*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree")
+ if(FAIL == H5B_create(f, dxpl_id, H5B_SNODE, NULL, NULL, &(stab->btree_addr)/*out*/))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree")
/* Create symbol table private heap */
- if(H5HL_create(f, dxpl_id, size_hint, &(stab->heap_addr)/*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap")
+ if(FAIL == H5HL_create(f, dxpl_id, size_hint, &(stab->heap_addr)/*out*/))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap")
/* Pin the heap down in memory */
if(NULL == (heap = H5HL_protect(f, dxpl_id, stab->heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap")
/* Insert name into the heap */
- if((size_t)(-1) == (name_offset = H5HL_insert(f, dxpl_id, heap, (size_t)1, "")))
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert name into heap")
+ if(UFAIL == (name_offset = H5HL_insert(f, dxpl_id, heap, (size_t)1, "")))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert name into heap")
/*
* B-tree's won't work if the first name isn't at the beginning
@@ -175,7 +175,7 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t
done:
/* Release resources */
- if(heap && H5HL_unprotect(heap) < 0)
+ if(heap && FAIL == H5HL_unprotect(heap))
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)