summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2002-10-01 14:35:01 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2002-10-01 14:35:01 (GMT)
commit09325c1da67ed0b747b70951f1e373ddd42f9478 (patch)
tree9f5733d3495e4b67b1791d95a32174c71d89f51a /src/H5F.c
parent8410a8536536ad6bdde5f09e643a9123df555460 (diff)
downloadhdf5-09325c1da67ed0b747b70951f1e373ddd42f9478.zip
hdf5-09325c1da67ed0b747b70951f1e373ddd42f9478.tar.gz
hdf5-09325c1da67ed0b747b70951f1e373ddd42f9478.tar.bz2
[svn-r5955]
Purpose: a bug fix Description: modify the condition check for the file close degree. Platforms tested: Linux 2.2(eirene), Solaris 2.7(arabica), IRIX64 6.5(modi4)
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/H5F.c b/src/H5F.c
index ec0fb31..01128bd 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2042,19 +2042,16 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
if(shared->nrefs == 1) {
if(fc_degree == H5F_CLOSE_DEFAULT)
- shared->fc_degree = H5F_CLOSE_DEFAULT;
+ shared->fc_degree = shared->lf->cls->fc_degree;
else
shared->fc_degree = fc_degree;
} else if(shared->nrefs > 1) {
- if(fc_degree==H5F_CLOSE_DEFAULT) {
- if(shared->fc_degree != H5F_CLOSE_DEFAULT && shared->fc_degree!=shared->lf->cls->fc_degree)
+ if(fc_degree==H5F_CLOSE_DEFAULT && shared->fc_degree!=shared->lf->cls->fc_degree)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match");
- } else {
- if(fc_degree != shared->fc_degree)
+ if(fc_degree!=H5F_CLOSE_DEFAULT && fc_degree != shared->fc_degree)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match");
- }
}
-
+
/* Success */
ret_value = file;
@@ -2687,10 +2684,7 @@ H5F_close(H5F_t *f)
assert(1==f->nrefs);
/* Get the close degree from the file */
- if(f->shared->fc_degree == H5F_CLOSE_DEFAULT)
- fc_degree = f->shared->lf->cls->fc_degree;
- else
- fc_degree = f->shared->fc_degree;
+ fc_degree = f->shared->fc_degree;
/* if close degree if "semi" and there are objects left open and we are
* holding open the file with this file ID, fail now */