diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2017-06-09 22:09:08 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2017-06-09 22:09:08 (GMT) |
commit | 005bf26ff83fcd28255a77fb9bbb4a64495cb4a2 (patch) | |
tree | cbaf52a8a57f0fb6ad45c74b3193e6ee55ecbc78 /src/H5Dchunk.c | |
parent | eaedb70001536ae6c2a7f753c3a358f0e8ce5011 (diff) | |
download | hdf5-005bf26ff83fcd28255a77fb9bbb4a64495cb4a2.zip hdf5-005bf26ff83fcd28255a77fb9bbb4a64495cb4a2.tar.gz hdf5-005bf26ff83fcd28255a77fb9bbb4a64495cb4a2.tar.bz2 |
Revert "Merge pull request #567 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop to develop"
This reverts commit 4242753848c44ab3b5d226e66225eac2f64db314, reversing
changes made to b0e79fe6dd20ec7aa1b3e5f0f8b370639a4ef5bd.
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r-- | src/H5Dchunk.c | 16 |
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() */ |