summaryrefslogtreecommitdiffstats
path: root/src/H5Goh.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-02-02 21:01:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-02-02 21:01:17 (GMT)
commit62904695182d78d64992230aac19025ee770b5d2 (patch)
treed83456262e922b9ac225817b927f1eb834d44119 /src/H5Goh.c
parent01d1e93b37007e34b6250fdb31bdf1f309e2e108 (diff)
downloadhdf5-62904695182d78d64992230aac19025ee770b5d2.zip
hdf5-62904695182d78d64992230aac19025ee770b5d2.tar.gz
hdf5-62904695182d78d64992230aac19025ee770b5d2.tar.bz2
[svn-r16400] Description:
Bring r16399 back from trunk: Remove some internal calls to H5E_clear_stack(). Tested on: FreeBSD/32 6.3 (duty) Too minor to require h5committest
Diffstat (limited to 'src/H5Goh.c')
-rw-r--r--src/H5Goh.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/H5Goh.c b/src/H5Goh.c
index 2dab8aa..aa0fbe6 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -260,9 +260,9 @@ done:
herr_t
H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
{
- H5O_linfo_t linfo; /* Link info message */
- H5HF_t *fheap = NULL; /* Fractal heap handle */
- herr_t ret_value = SUCCEED; /* Return value */
+ htri_t exists; /* Flag if header message of interest exists */
+ H5HF_t *fheap = NULL; /* Fractal heap handle */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_group_bh_info, FAIL)
@@ -272,21 +272,15 @@ H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
HDassert(bh_info);
/* Check for "new style" group info */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LINFO_ID, &linfo)) {
- H5O_stab_t stab; /* Info about symbol table */
-
- /* Must be "old style" group, clear error stack */
- H5E_clear_stack(NULL);
+ if((exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ if(exists > 0) {
+ H5O_linfo_t linfo; /* Link info message */
- /* Get symbol table message */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_STAB_ID, &stab))
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't find LINFO nor STAB messages")
+ /* Get "new style" group info */
+ if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LINFO_ID, &linfo))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't read LINFO message")
- /* Get symbol table size info */
- if(H5G_stab_bh_size(f, dxpl_id, &stab, bh_info) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve symbol table size info")
- } /* end if */
- else { /* LINFO */
/* Get creation order B-tree size, if available */
if(H5F_addr_defined(linfo.corder_bt2_addr))
if(H5B2_iterate_size(f, dxpl_id, H5G_BT2_CORDER, linfo.corder_bt2_addr, &bh_info->index_size) < 0)
@@ -312,6 +306,17 @@ H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
HGOTO_ERROR(H5E_HEAP, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
fheap = NULL;
} /* end if */
+ } /* end if */
+ else {
+ H5O_stab_t stab; /* Info about symbol table */
+
+ /* Must be "old style" group, get symbol table message */
+ if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_STAB_ID, &stab))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't find LINFO nor STAB messages")
+
+ /* Get symbol table size info */
+ if(H5G_stab_bh_size(f, dxpl_id, &stab, bh_info) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve symbol table size info")
} /* end else */
done: