summaryrefslogtreecommitdiffstats
path: root/src/H5Gstab.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-12-14 01:22:33 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-12-14 01:22:33 (GMT)
commitabf03a6c650928881a6c929312d1e4f50101d50e (patch)
tree29a88ab0bff52265c2ca0f80a0ae0aeeeccb1c00 /src/H5Gstab.c
parente78db67c621a2ce04d95c1c6b2b4b3c23682abfb (diff)
downloadhdf5-abf03a6c650928881a6c929312d1e4f50101d50e.zip
hdf5-abf03a6c650928881a6c929312d1e4f50101d50e.tar.gz
hdf5-abf03a6c650928881a6c929312d1e4f50101d50e.tar.bz2
[svn-r28612] Normalization of H5G package with revise_chunks.
Mostly minor fixes like warnings, etc. Tested on: Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 serial only (these changes have been in revise_chunks for a long time)
Diffstat (limited to 'src/H5Gstab.c')
-rw-r--r--src/H5Gstab.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 7f4b8df..3a7cd9e 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -156,16 +156,16 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t
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__NO_FLAGS_SET)))
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)