summaryrefslogtreecommitdiffstats
path: root/src/H5FDfamily.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-03-25 03:51:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-03-25 03:51:41 (GMT)
commit42efc1c2b591e4cd45ec6cb3bdf32044343118d2 (patch)
tree0ab542871c32246199479e8933ff26286aaf629a /src/H5FDfamily.c
parent3360c3af0c100ac4d3a2fe2865f34661da862ec5 (diff)
downloadhdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.zip
hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.tar.gz
hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.tar.bz2
[svn-r18451] Description:
Bring r18172:18446 from trunk to revise_chunks branch. 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, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5FDfamily.c')
-rw-r--r--src/H5FDfamily.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 3c25426..67bb107 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -632,9 +632,9 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
name[8] = '\0';
/* Store member file size. Use the member file size from the property here.
- * This is to guarantee backward compatibility. If a file is created with
+ * This is to guarantee backward compatibility. If a file is created with
* v1.6 library and the driver info isn't saved in the superblock. We open
- * it with v1.8, the FILE->MEMB_SIZE will be the actual size of the first
+ * it with v1.8, the FILE->MEMB_SIZE will be the actual size of the first
* member file (see H5FD_family_open). So it isn't safe to use FILE->MEMB_SIZE.
* If the file is created with v1.8, the correctness of FILE->PMEM_SIZE is
* checked in H5FD_family_sb_decode. SLU - 2009/3/21
@@ -894,45 +894,43 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_close(H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned nerrors=0; /* Number of errors while closing member files */
- unsigned u; /* Local index variable */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ unsigned nerrors = 0; /* Number of errors while closing member files */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_family_close, FAIL)
/* 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++;
else
file->memb[u] = NULL;
- }
- }
- if (nerrors)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close member files")
+ } /* end if */
+ } /* end for */
+ if(nerrors)
+ /* Push error, but keep going*/
+ 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)<0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
- if (file->memb)
- H5MM_xfree(file->memb);
- if (file->name)
- H5MM_xfree(file->name);
+ if(H5I_dec_ref(file->memb_fapl_id, FALSE) < 0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
+ H5MM_xfree(file->memb);
+ H5MM_xfree(file->name);
H5MM_xfree(file);
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_family_close() */
/*-------------------------------------------------------------------------