From 1528a6ad07947e31d7c8536911a82c2d1d6aa6c0 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 2 Feb 2009 15:53:25 -0500 Subject: [svn-r16399] Description: Remove some internal calls to H5E_clear_stack(). Tested on: FreeBSD/32 6.3 (duty) Too minor to require h5committest --- src/H5Dchunk.c | 5 ----- src/H5Gobj.c | 3 --- src/H5Goh.c | 37 +++++++++++++++++++++---------------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index afcdc6d..7627cec 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2526,11 +2526,6 @@ H5D_chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, else { H5D_fill_value_t fill_status; -#ifdef OLD_WAY - /* Clear the error stack from not finding the chunk on disk */ - H5E_clear_stack(NULL); -#endif /* OLD_WAY */ - /* Chunk size on disk isn't [likely] the same size as the final chunk * size in memory, so allocate memory big enough. */ if(NULL == (chunk = H5D_chunk_alloc(chunk_size, pline))) diff --git a/src/H5Gobj.c b/src/H5Gobj.c index e0d5434..a6b2d7f 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -1066,9 +1066,6 @@ H5G_obj_remove_by_idx(H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, } /* end else */ } /* end if */ else { - /* Clear error stack from not finding the link info message */ - H5E_clear_stack(NULL); - /* Can only perform name lookups on groups with symbol tables */ if(idx_type != H5_INDEX_NAME) HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") 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: -- cgit v0.12