diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-02-02 20:53:25 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-02-02 20:53:25 (GMT) |
commit | 1528a6ad07947e31d7c8536911a82c2d1d6aa6c0 (patch) | |
tree | 6bc263253cd2506eca04f5d502c9c4b7781360c8 /src/H5Goh.c | |
parent | 01d8f959f9193d17878cc72aa2b3812dddac664b (diff) | |
download | hdf5-1528a6ad07947e31d7c8536911a82c2d1d6aa6c0.zip hdf5-1528a6ad07947e31d7c8536911a82c2d1d6aa6c0.tar.gz hdf5-1528a6ad07947e31d7c8536911a82c2d1d6aa6c0.tar.bz2 |
[svn-r16399] Description:
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.c | 37 |
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: |