diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-01-08 20:01:16 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-01-08 20:01:16 (GMT) |
commit | df60e8a5233cf6adbd786b80442f6c35f54a4e15 (patch) | |
tree | 4ddb125317b6f9f859b65a2a96dbc30f981ddd9b /src/H5Oainfo.c | |
parent | 322b981c37ae88de5f1ca73825abdcde6bcf0d4b (diff) | |
download | hdf5-df60e8a5233cf6adbd786b80442f6c35f54a4e15.zip hdf5-df60e8a5233cf6adbd786b80442f6c35f54a4e15.tar.gz hdf5-df60e8a5233cf6adbd786b80442f6c35f54a4e15.tar.bz2 |
[svn-r18090] Description:
Correct Coverity issue #11 by removing impossible to reach code. Also clean
up some minor style issues.
Tested on:
Mac OS X/32 10.6.3 (amazon) w/debug
Diffstat (limited to 'src/H5Oainfo.c')
-rw-r--r-- | src/H5Oainfo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index e61d899..0984cd4 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -431,17 +431,17 @@ H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, if(H5A_dense_create(file_dst, dxpl_id, ainfo_dst) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to create dense storage for attributes") - if ( (H5A_dense_copy_file_all(file_src, ainfo_src, file_dst, ainfo_dst, recompute_size, cpy_info, dxpl_id)) <0) + if((H5A_dense_copy_file_all(file_src, ainfo_src, file_dst, ainfo_dst, recompute_size, cpy_info, dxpl_id)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to create dense storage for attributes") - } + } /* end if */ /* Set return value */ ret_value = ainfo_dst; done: /* Release destination attribute information on failure */ - if(ret_value == NULL && ainfo_dst != NULL) - (void)H5FL_FREE(H5O_ainfo_t, ainfo_dst); + if(!ret_value && ainfo_dst) + ainfo_dst = H5FL_FREE(H5O_ainfo_t, ainfo_dst); FUNC_LEAVE_NOAPI(ret_value) } /* H5O_ainfo_copy_file() */ |