summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5EAcache.c16
-rw-r--r--src/H5EAdblkpage.c2
-rw-r--r--src/H5EAdblock.c8
-rw-r--r--src/H5EAhdr.c2
-rw-r--r--src/H5EAiblock.c11
-rw-r--r--src/H5EApkg.h6
-rw-r--r--src/H5EAsblock.c11
-rw-r--r--src/H5FAcache.c9
-rw-r--r--src/H5FAdblkpage.c6
-rw-r--r--src/H5FAdblock.c12
-rw-r--r--src/H5FApkg.h2
11 files changed, 37 insertions, 48 deletions
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 44b5668..646f376 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -329,7 +329,7 @@ CATCH
if(wb && H5WB_unwrap(wb) < 0)
H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer")
if(!ret_value)
- if(hdr && H5EA__cache_hdr_dest(f, hdr) < 0)
+ if(hdr && H5EA__hdr_dest(hdr) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array header")
END_FUNC(STATIC) /* end H5EA__cache_hdr_load() */
@@ -685,7 +685,7 @@ CATCH
if(wb && H5WB_unwrap(wb) < 0)
H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer")
if(!ret_value)
- if(iblock && H5EA__cache_iblock_dest(f, iblock) < 0)
+ if(iblock && H5EA__iblock_dest(iblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array index block")
END_FUNC(STATIC) /* end H5EA__cache_iblock_load() */
@@ -957,7 +957,7 @@ H5EA__cache_iblock_dest(H5F_t *f, H5EA_iblock_t *iblock))
} /* end if */
/* Release the index block */
- if(H5EA__iblock_dest(f, iblock) < 0)
+ if(H5EA__iblock_dest(iblock) < 0)
H5E_THROW(H5E_CANTFREE, "can't free extensible array index block")
CATCH
@@ -1094,7 +1094,7 @@ CATCH
if(wb && H5WB_unwrap(wb) < 0)
H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer")
if(!ret_value)
- if(sblock && H5EA__cache_sblock_dest(f, sblock) < 0)
+ if(sblock && H5EA__sblock_dest(sblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array super block")
END_FUNC(STATIC) /* end H5EA__cache_sblock_load() */
@@ -1356,7 +1356,7 @@ H5EA__cache_sblock_dest(H5F_t *f, H5EA_sblock_t *sblock))
} /* end if */
/* Release the super block */
- if(H5EA__sblock_dest(f, sblock) < 0)
+ if(H5EA__sblock_dest(sblock) < 0)
H5E_THROW(H5E_CANTFREE, "can't free extensible array super block")
CATCH
@@ -1491,7 +1491,7 @@ CATCH
if(wb && H5WB_unwrap(wb) < 0)
H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer")
if(!ret_value)
- if(dblock && H5EA__cache_dblock_dest(f, dblock) < 0)
+ if(dblock && H5EA__dblock_dest(dblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block")
END_FUNC(STATIC) /* end H5EA__cache_dblock_load() */
@@ -1758,7 +1758,7 @@ H5EA__cache_dblock_dest(H5F_t *f, H5EA_dblock_t *dblock))
} /* end if */
/* Release the data block */
- if(H5EA__dblock_dest(f, dblock) < 0)
+ if(H5EA__dblock_dest(dblock) < 0)
H5E_THROW(H5E_CANTFREE, "can't free extensible array data block")
CATCH
@@ -1867,7 +1867,7 @@ CATCH
if(wb && H5WB_unwrap(wb) < 0)
H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer")
if(!ret_value)
- if(dblk_page && H5EA__cache_dblk_page_dest(f, dblk_page) < 0)
+ if(dblk_page && H5EA__dblk_page_dest(dblk_page) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block page")
END_FUNC(STATIC) /* end H5EA__cache_dblk_page_load() */
diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c
index 429e9f8..7b42afc 100644
--- a/src/H5EAdblkpage.c
+++ b/src/H5EAdblkpage.c
@@ -310,7 +310,7 @@ H5EA__dblk_page_dest(H5EA_dblk_page_t *dblk_page))
} /* end if */
/* Free the data block page itself */
- (void)H5FL_FREE(H5EA_dblk_page_t, dblk_page);
+ dblk_page = H5FL_FREE(H5EA_dblk_page_t, dblk_page);
CATCH
diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c
index 344b9fa..d56e157 100644
--- a/src/H5EAdblock.c
+++ b/src/H5EAdblock.c
@@ -141,7 +141,7 @@ H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts))
CATCH
if(!ret_value)
- if(dblock && H5EA__dblock_dest(hdr->f, dblock) < 0)
+ if(dblock && H5EA__dblock_dest(dblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block")
END_FUNC(PKG) /* end H5EA__dblock_alloc() */
@@ -230,7 +230,7 @@ CATCH
H5E_THROW(H5E_CANTFREE, "unable to release extensible array data block")
/* Destroy data block */
- if(H5EA__dblock_dest(hdr->f, dblock) < 0)
+ if(H5EA__dblock_dest(dblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array data block")
} /* end if */
@@ -455,7 +455,7 @@ END_FUNC(PKG) /* end H5EA__dblock_delete() */
/* ARGSUSED */
BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__dblock_dest(H5F_t UNUSED *f, H5EA_dblock_t *dblock))
+H5EA__dblock_dest(H5EA_dblock_t *dblock))
/* Sanity check */
HDassert(dblock);
@@ -479,7 +479,7 @@ H5EA__dblock_dest(H5F_t UNUSED *f, H5EA_dblock_t *dblock))
} /* end if */
/* Free the data block itself */
- (void)H5FL_FREE(H5EA_dblock_t, dblock);
+ dblock = H5FL_FREE(H5EA_dblock_t, dblock);
CATCH
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index 8774840..8eee692 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -348,7 +348,7 @@ HDfprintf(stderr, "%s: nelmts = %Zu, hdr->data_blk_min_elmts = %u, idx = %u\n",
/* Free buffer for elements in index block */
HDassert(idx < hdr->elmt_fac.nalloc);
HDassert(hdr->elmt_fac.fac[idx]);
- (void)H5FL_FAC_FREE(hdr->elmt_fac.fac[idx], elmts);
+ elmts = H5FL_FAC_FREE(hdr->elmt_fac.fac[idx], elmts);
END_FUNC(PKG) /* end H5EA__hdr_free_elmts() */
diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c
index 9920277..734dda0 100644
--- a/src/H5EAiblock.c
+++ b/src/H5EAiblock.c
@@ -157,7 +157,7 @@ HDfprintf(stderr, "%s: iblock->nsblk_addrs = %Zu\n", FUNC, iblock->nsblk_addrs);
CATCH
if(!ret_value)
- if(iblock && H5EA__iblock_dest(hdr->f, iblock) < 0)
+ if(iblock && H5EA__iblock_dest(iblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array index block")
END_FUNC(PKG) /* end H5EA__iblock_alloc() */
@@ -257,7 +257,7 @@ CATCH
H5E_THROW(H5E_CANTFREE, "unable to release extensible array index block")
/* Destroy index block */
- if(H5EA__iblock_dest(hdr->f, iblock) < 0)
+ if(H5EA__iblock_dest(iblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array index block")
} /* end if */
@@ -432,7 +432,7 @@ END_FUNC(PKG) /* end H5EA__iblock_delete() */
/* ARGSUSED */
BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__iblock_dest(H5F_t *f, H5EA_iblock_t *iblock))
+H5EA__iblock_dest(H5EA_iblock_t *iblock))
/* Sanity check */
HDassert(iblock);
@@ -440,9 +440,6 @@ H5EA__iblock_dest(H5F_t *f, H5EA_iblock_t *iblock))
/* Check if shared header field has been initialized */
if(iblock->hdr) {
- /* Set the shared array header's file context for this operation */
- iblock->hdr->f = f;
-
/* Check if we've got elements in the index block */
if(iblock->elmts) {
/* Free buffer for index block elements */
@@ -473,7 +470,7 @@ H5EA__iblock_dest(H5F_t *f, H5EA_iblock_t *iblock))
} /* end if */
/* Free the index block itself */
- (void)H5FL_FREE(H5EA_iblock_t, iblock);
+ iblock = H5FL_FREE(H5EA_iblock_t, iblock);
CATCH
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index 9b6b368..52baf40 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -391,7 +391,7 @@ H5_DLL H5EA_iblock_t *H5EA__iblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id,
H5_DLL herr_t H5EA__iblock_unprotect(H5EA_iblock_t *iblock, hid_t dxpl_id,
unsigned cache_flags);
H5_DLL herr_t H5EA__iblock_delete(H5EA_hdr_t *hdr, hid_t dxpl_id);
-H5_DLL herr_t H5EA__iblock_dest(H5F_t *f, H5EA_iblock_t *iblock);
+H5_DLL herr_t H5EA__iblock_dest(H5EA_iblock_t *iblock);
/* Super block routines */
H5_DLL H5EA_sblock_t *H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent,
@@ -404,7 +404,7 @@ H5_DLL herr_t H5EA__sblock_unprotect(H5EA_sblock_t *sblock, hid_t dxpl_id,
unsigned cache_flags);
H5_DLL herr_t H5EA__sblock_delete(H5EA_hdr_t *hdr, hid_t dxpl_id,
H5EA_iblock_t *parent, haddr_t sblk_addr, unsigned sblk_idx);
-H5_DLL herr_t H5EA__sblock_dest(H5F_t *f, H5EA_sblock_t *sblock);
+H5_DLL herr_t H5EA__sblock_dest(H5EA_sblock_t *sblock);
/* Data block routines */
H5_DLL H5EA_dblock_t *H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent,
@@ -418,7 +418,7 @@ H5_DLL herr_t H5EA__dblock_unprotect(H5EA_dblock_t *dblock, hid_t dxpl_id,
unsigned cache_flags);
H5_DLL herr_t H5EA__dblock_delete(H5EA_hdr_t *hdr, hid_t dxpl_id, void *parent,
haddr_t dblk_addr, size_t dblk_nelmts);
-H5_DLL herr_t H5EA__dblock_dest(H5F_t *f, H5EA_dblock_t *dblock);
+H5_DLL herr_t H5EA__dblock_dest(H5EA_dblock_t *dblock);
/* Data block page routines */
H5_DLL H5EA_dblk_page_t *H5EA__dblk_page_alloc(H5EA_hdr_t *hdr, H5EA_sblock_t *parent);
diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c
index c6a4306..44c0a02 100644
--- a/src/H5EAsblock.c
+++ b/src/H5EAsblock.c
@@ -170,7 +170,7 @@ HDfprintf(stderr, "%s: hdr->dblk_page_nelmts = %Zu, sblock->ndblks = %Zu, sblock
CATCH
if(!ret_value)
- if(sblock && H5EA__sblock_dest(hdr->f, sblock) < 0)
+ if(sblock && H5EA__sblock_dest(sblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array super block")
END_FUNC(PKG) /* end H5EA__sblock_alloc() */
@@ -253,7 +253,7 @@ CATCH
H5E_THROW(H5E_CANTFREE, "unable to release extensible array super block")
/* Destroy super block */
- if(H5EA__sblock_dest(hdr->f, sblock) < 0)
+ if(H5EA__sblock_dest(sblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy extensible array super block")
} /* end if */
@@ -407,7 +407,7 @@ END_FUNC(PKG) /* end H5EA__sblock_delete() */
/* ARGSUSED */
BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__sblock_dest(H5F_t *f, H5EA_sblock_t *sblock))
+H5EA__sblock_dest(H5EA_sblock_t *sblock))
/* Sanity check */
HDassert(sblock);
@@ -418,9 +418,6 @@ HDfprintf(stderr, "%s: sblock->hdr->dblk_page_nelmts = %Zu, sblock->ndblks = %Zu
/* Check if shared header field has been initialized */
if(sblock->hdr) {
- /* Set the shared array header's file context for this operation */
- sblock->hdr->f = f;
-
/* Free buffer for super block data block addresses, if there are any */
if(sblock->dblk_addrs)
sblock->dblk_addrs = H5FL_SEQ_FREE(haddr_t, sblock->dblk_addrs);
@@ -438,7 +435,7 @@ HDfprintf(stderr, "%s: sblock->hdr->dblk_page_nelmts = %Zu, sblock->ndblks = %Zu
} /* end if */
/* Free the super block itself */
- (void)H5FL_FREE(H5EA_sblock_t, sblock);
+ sblock = H5FL_FREE(H5EA_sblock_t, sblock);
CATCH
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index 9fa9941..f9bf595 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -279,7 +279,7 @@ CATCH
if(wb && H5WB_unwrap(wb) < 0)
H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer")
if(!ret_value)
- if(hdr && H5FA__cache_hdr_dest(f, hdr) < 0)
+ if(hdr && H5FA__hdr_dest(hdr) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array header")
END_FUNC(STATIC) /* end H5FA__cache_hdr_load() */
@@ -485,7 +485,6 @@ CATCH
END_FUNC(STATIC) /* end H5FA__cache_hdr_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5FA__cache_dblock_load
@@ -614,7 +613,7 @@ CATCH
if(wb && H5WB_unwrap(wb) < 0)
H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer")
if(!ret_value)
- if(dblock && H5FA__cache_dblock_dest(f, dblock) < 0)
+ if(dblock && H5FA__dblock_dest(dblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block")
END_FUNC(STATIC) /* end H5FA__cache_dblock_load() */
@@ -833,7 +832,7 @@ H5FA__cache_dblock_dest(H5F_t *f, H5FA_dblock_t *dblock))
} /* end if */
/* Release the data block */
- if(H5FA__dblock_dest(f, dblock) < 0)
+ if(H5FA__dblock_dest(dblock) < 0)
H5E_THROW(H5E_CANTFREE, "can't free fixed array data block")
CATCH
@@ -941,7 +940,7 @@ CATCH
if(wb && H5WB_unwrap(wb) < 0)
H5E_THROW(H5E_CLOSEERROR, "can't close wrapped buffer")
if(!ret_value)
- if(dblk_page && H5FA__cache_dblk_page_dest(f, dblk_page) < 0)
+ if(dblk_page && H5FA__dblk_page_dest(dblk_page) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block page")
END_FUNC(STATIC) /* end H5FA__cache_dblk_page_load() */
diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c
index a1bd90e..2291063 100644
--- a/src/H5FAdblkpage.c
+++ b/src/H5FAdblkpage.c
@@ -280,7 +280,6 @@ END_FUNC(PKG) /* end H5FA__dblk_page_unprotect() */
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page))
@@ -293,8 +292,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page))
/* Check if buffer for data block page elements has been initialized */
if(dblk_page->elmts) {
/* Free buffer for data block page elements */
- (void) H5FL_BLK_FREE(page_elmts, dblk_page->elmts);
- dblk_page->elmts = NULL;
+ dblk_page->elmts = H5FL_BLK_FREE(page_elmts, dblk_page->elmts);
} /* end if */
/* Decrement reference count on shared info */
@@ -304,7 +302,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page))
} /* end if */
/* Free the data block page itself */
- (void)H5FL_FREE(H5FA_dblk_page_t, dblk_page);
+ dblk_page = H5FL_FREE(H5FA_dblk_page_t, dblk_page);
CATCH
diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c
index f564fee..d2ab5d9 100644
--- a/src/H5FAdblock.c
+++ b/src/H5FAdblock.c
@@ -166,7 +166,7 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr, hsize_t nelmts))
CATCH
if(!ret_value)
- if(dblock && H5FA__dblock_dest(hdr->f, dblock) < 0)
+ if(dblock && H5FA__dblock_dest(dblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block")
END_FUNC(PKG) /* end H5FA__dblock_alloc() */
@@ -243,7 +243,7 @@ CATCH
H5E_THROW(H5E_CANTFREE, "unable to release fixed array data block")
/* Destroy data block */
- if(H5FA__dblock_dest(hdr->f, dblock) < 0)
+ if(H5FA__dblock_dest(dblock) < 0)
H5E_THROW(H5E_CANTFREE, "unable to destroy fixed array data block")
} /* end if */
@@ -401,10 +401,9 @@ END_FUNC(PKG) /* end H5FA__dblock_delete() */
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
-H5FA__dblock_dest(H5F_t UNUSED *f, H5FA_dblock_t *dblock))
+H5FA__dblock_dest(H5FA_dblock_t *dblock))
/* Sanity check */
HDassert(dblock);
@@ -415,8 +414,7 @@ H5FA__dblock_dest(H5F_t UNUSED *f, H5FA_dblock_t *dblock))
if(dblock->elmts && !dblock->npages) {
/* Free buffer for data block elements */
HDassert(dblock->hdr->cparam.nelmts > 0);
- (void) H5FL_BLK_FREE(chunk_elmts, dblock->elmts);
- dblock->elmts = NULL;
+ dblock->elmts = H5FL_BLK_FREE(chunk_elmts, dblock->elmts);
} /* end if */
/* Check if data block is paged */
@@ -434,7 +432,7 @@ H5FA__dblock_dest(H5F_t UNUSED *f, H5FA_dblock_t *dblock))
} /* end if */
/* Free the data block itself */
- (void)H5FL_FREE(H5FA_dblock_t, dblock);
+ dblock = H5FL_FREE(H5FA_dblock_t, dblock);
CATCH
diff --git a/src/H5FApkg.h b/src/H5FApkg.h
index 1868d4f..955855c 100644
--- a/src/H5FApkg.h
+++ b/src/H5FApkg.h
@@ -260,7 +260,7 @@ H5_DLL herr_t H5FA__dblock_unprotect(H5FA_dblock_t *dblock, hid_t dxpl_id,
unsigned cache_flags);
H5_DLL herr_t H5FA__dblock_delete(H5FA_hdr_t *hdr, hid_t dxpl_id,
haddr_t dblk_addr, hsize_t dblk_nelmts);
-H5_DLL herr_t H5FA__dblock_dest(H5F_t *f, H5FA_dblock_t *dblock);
+H5_DLL herr_t H5FA__dblock_dest(H5FA_dblock_t *dblock);
/* Data block page routines */
H5_DLL herr_t H5FA__dblk_page_create(H5FA_hdr_t *hdr, hid_t dxpl_id,