diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-09-16 14:02:19 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-09-16 14:02:19 (GMT) |
commit | 1914737e0658d642c1ef2e48c6162fa7cc400c64 (patch) | |
tree | d514c5e86096148b10b67f5e178dce87a7625d4d /src/H5FDfamily.c | |
parent | e5575571d4faaee78c67fc7dbae7d8229b1bfb94 (diff) | |
download | hdf5-1914737e0658d642c1ef2e48c6162fa7cc400c64.zip hdf5-1914737e0658d642c1ef2e48c6162fa7cc400c64.tar.gz hdf5-1914737e0658d642c1ef2e48c6162fa7cc400c64.tar.bz2 |
[svn-r19398] Descriptino:
Clean up the internal usage H5I_dec_ref() to eliminate the sequence of
flags that has been creeping in.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.4 (amazon) in debug mode
Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'src/H5FDfamily.c')
-rw-r--r-- | src/H5FDfamily.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index ae66578..bd09ea4 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -468,11 +468,11 @@ static herr_t H5FD_family_fapl_free(void *_fa) { H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa; - herr_t ret_value=SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5FD_family_fapl_free, FAIL) - if(H5I_dec_ref(fa->memb_fapl_id, FALSE, FALSE)<0) + if(H5I_dec_ref(fa->memb_fapl_id) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID") H5MM_xfree(fa); @@ -554,11 +554,11 @@ static herr_t H5FD_family_dxpl_free(void *_dx) { H5FD_family_dxpl_t *dx = (H5FD_family_dxpl_t*)_dx; - herr_t ret_value=SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5FD_family_dxpl_free, FAIL) - if(H5I_dec_ref(dx->memb_dxpl_id, FALSE, FALSE)<0) + if(H5I_dec_ref(dx->memb_dxpl_id) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID") H5MM_xfree(dx); @@ -855,29 +855,30 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id, done: /* Cleanup and fail */ - if (ret_value==NULL && file!=NULL) { - unsigned nerrors=0; /* Number of errors closing member files */ + if(ret_value == NULL && file != NULL) { + unsigned nerrors = 0; /* Number of errors closing member files */ unsigned u; /* Local index variable */ /* Close as many members as possible. Use private function here to avoid clearing * the error stack. We need the error message to indicate wrong member file size. */ - for (u=0; u<file->nmembs; u++) - if (file->memb[u]) - if (H5FD_close(file->memb[u])<0) + for(u = 0; u < file->nmembs; u++) + if(file->memb[u]) + if(H5FD_close(file->memb[u]) < 0) nerrors++; - if (nerrors) + if(nerrors) HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "unable to close member files") - if (file->memb) + if(file->memb) H5MM_xfree(file->memb); - if(H5I_dec_ref(file->memb_fapl_id, FALSE, FALSE)<0) + if(H5I_dec_ref(file->memb_fapl_id) < 0) HDONE_ERROR(H5E_VFL, H5E_CANTDEC, NULL, "can't close driver ID") - if (file->name) + if(file->name) H5MM_xfree(file->name); H5MM_xfree(file); - } + } /* end if */ + FUNC_LEAVE_NOAPI(ret_value) -} +} /* end H5FD_family_open() */ /*------------------------------------------------------------------------- @@ -921,7 +922,7 @@ H5FD_family_close(H5FD_t *_file) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close member files") /* Clean up other stuff */ - if(H5I_dec_ref(file->memb_fapl_id, FALSE, FALSE) < 0) + if(H5I_dec_ref(file->memb_fapl_id) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID") H5MM_xfree(file->memb); |