summaryrefslogtreecommitdiffstats
path: root/src/H5Dchunk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r--src/H5Dchunk.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 317039d..33fc036 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -368,9 +368,6 @@ H5FL_BLK_DEFINE_STATIC(chunk);
/* Declare extern free list to manage the H5S_sel_iter_t struct */
H5FL_EXTERN(H5S_sel_iter_t);
-/* Declare a free list to manage the H5O_layout_t struct */
-H5FL_EXTERN(H5O_layout_t);
-
/*-------------------------------------------------------------------------
* Function: H5D__chunk_direct_write
@@ -5446,7 +5443,7 @@ herr_t
H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5O_layout_t *layout = NULL; /* Dataset layout message */
+ H5O_layout_t layout; /* Dataset layout message */
hbool_t layout_read = FALSE; /* Whether the layout message was read from the file */
H5O_pline_t pline; /* I/O pipeline message */
hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read from the file */
@@ -5477,9 +5474,7 @@ H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage)
if((exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to check for object header message")
else if(exists) {
- if(NULL == (layout = H5FL_CALLOC(H5O_layout_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't get memory for layout")
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, layout))
+ if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout message")
layout_read = TRUE;
} /* end else if */
@@ -5490,7 +5485,7 @@ H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage)
idx_info.f = f;
idx_info.dxpl_id = dxpl_id;
idx_info.pline = &pline;
- idx_info.layout = &layout->u.chunk;
+ idx_info.layout = &layout.u.chunk;
idx_info.storage = &storage->u.chunk;
/* Delete the chunked storage information in the file */
@@ -5503,12 +5498,9 @@ done:
if(H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset I/O pipeline message")
if(layout_read)
- if(H5O_msg_reset(H5O_LAYOUT_ID, layout) < 0)
+ if(H5O_msg_reset(H5O_LAYOUT_ID, &layout) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset layout message")
- if(layout)
- layout = H5FL_FREE(H5O_layout_t, layout);
-
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_delete() */