summaryrefslogtreecommitdiffstats
path: root/src/H5Dfill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dfill.c')
-rw-r--r--src/H5Dfill.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index 1db2976..1929a5a 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -363,7 +363,6 @@ done:
*/
herr_t
H5D_fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
- hbool_t alloc_vl_during_refill,
H5MM_allocate_t alloc_func, void *alloc_info,
H5MM_free_t free_func, void *free_info,
const H5O_fill_t *fill, const H5T_t *dset_type, hid_t dset_type_id,
@@ -386,7 +385,6 @@ H5D_fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
fb_info->fill = fill;
fb_info->file_type = dset_type;
fb_info->file_tid = dset_type_id;
- fb_info->alloc_vl_during_refill = alloc_vl_during_refill;
fb_info->fill_alloc_func = alloc_func;
fb_info->fill_alloc_info = alloc_info;
fb_info->fill_free_func = free_func;
@@ -434,16 +432,12 @@ H5D_fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
fb_info->use_caller_fill_buf = TRUE;
} /* end if */
else {
- if(alloc_vl_during_refill)
- fb_info->fill_buf = NULL;
- else {
- if(alloc_func)
- fb_info->fill_buf = alloc_func(fb_info->fill_buf_size, alloc_info);
- else
- fb_info->fill_buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size);
- if(NULL == fb_info->fill_buf)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer")
- } /* end else */
+ if(alloc_func)
+ fb_info->fill_buf = alloc_func(fb_info->fill_buf_size, alloc_info);
+ else
+ fb_info->fill_buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size);
+ if(NULL == fb_info->fill_buf)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer")
} /* end else */
/* Get the datatype conversion path for this operation */
@@ -577,16 +571,7 @@ H5D_fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts, hid_t dxpl_id)
/* Check args */
HDassert(fb_info);
HDassert(fb_info->has_vlen_fill_type);
-
- /* Check if we should allocate the fill buffer now */
- if(fb_info->alloc_vl_during_refill) {
- if(fb_info->fill_alloc_func)
- fb_info->fill_buf = fb_info->fill_alloc_func(fb_info->fill_buf_size, fb_info->fill_alloc_info);
- else
- fb_info->fill_buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size);
- if(NULL == fb_info->fill_buf)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer")
- } /* end if */
+ HDassert(fb_info->fill_buf);
/* Make a copy of the (disk-based) fill value into the buffer */
HDmemcpy(fb_info->fill_buf, fb_info->fill->buf, fb_info->file_elmt_size);