diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-01-08 19:12:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-01-08 19:12:02 (GMT) |
commit | 8b5da53df2e15da42e4443c6da8cc45f867b50a8 (patch) | |
tree | 230c51643956e9e6adb4b4e0f6341f6ad35ca21c /src/H5HFsection.c | |
parent | 4b537ff8405630567cafd270a8e41c53c13b0e05 (diff) | |
download | hdf5-8b5da53df2e15da42e4443c6da8cc45f867b50a8.zip hdf5-8b5da53df2e15da42e4443c6da8cc45f867b50a8.tar.gz hdf5-8b5da53df2e15da42e4443c6da8cc45f867b50a8.tar.bz2 |
[svn-r18078] Description:
Correct Coverity issue #2 by removing impossible to reach code.
Tested on:
Mac OS X/32 10.6.2 (amazon) w/debug
Diffstat (limited to 'src/H5HFsection.c')
-rw-r--r-- | src/H5HFsection.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/H5HFsection.c b/src/H5HFsection.c index 91031be..efd0515 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -2415,7 +2415,6 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, unsigned nentries) { H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */ - hbool_t iblock_incr = FALSE; /* Indicate that parent iblock has been incremented */ H5HF_free_section_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_new) @@ -2438,7 +2437,6 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, sect->u.indirect.u.iblock->max_rows; if(H5HF_iblock_incr(sect->u.indirect.u.iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block") - iblock_incr = TRUE; } /* end if */ else { sect->u.indirect.u.iblock_off = iblock_off; @@ -2462,13 +2460,8 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, done: if(!ret_value && sect) { - /* Check if we should decrement parent ref. count */ - if(iblock_incr) - if(H5HF_iblock_decr(sect->u.indirect.u.iblock) < 0) - HDONE_ERROR(H5E_HEAP, H5E_CANTDEC, NULL, "can't decrement reference count on shared indirect block") - /* Release the section */ - (void)H5FL_FREE(H5HF_free_section_t, sect); + sect = H5FL_FREE(H5HF_free_section_t, sect); } /* end if */ FUNC_LEAVE_NOAPI(ret_value) |