summaryrefslogtreecommitdiffstats
path: root/src/H5Dfill.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-03-17 02:58:38 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-03-17 02:58:38 (GMT)
commitf0d22e54c705285b10f8192be6b26ba1a7ae3fbc (patch)
tree8ad7066b9cc25f160c910955555492640a9bc9ba /src/H5Dfill.c
parentd2591ce377bb027d210a100c5a738e3cdd82378e (diff)
parent5c80d3d91284bdcd048d9325b1a601d0ddfca8bd (diff)
downloadhdf5-f0d22e54c705285b10f8192be6b26ba1a7ae3fbc.zip
hdf5-f0d22e54c705285b10f8192be6b26ba1a7ae3fbc.tar.gz
hdf5-f0d22e54c705285b10f8192be6b26ba1a7ae3fbc.tar.bz2
Merge pull request #1604 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop to develop
* commit '5c80d3d91284bdcd048d9325b1a601d0ddfca8bd': - Added H5MMprivate.h #includes where needed - Added casts to quiet H5MM_memcpy warnings - Removed char * casts from HDmemcpy Added an H5MM_memcpy call that checks for buffer overlap.
Diffstat (limited to 'src/H5Dfill.c')
-rw-r--r--src/H5Dfill.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index 619f699..69f4ff8 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -38,6 +38,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
#include "H5VMprivate.h" /* Vector and array functions */
#include "H5WBprivate.h" /* Wrapped Buffers */
@@ -300,7 +301,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Copy the user's data into the buffer for conversion */
- HDmemcpy(elem_ptr, fill, src_type_size);
+ H5MM_memcpy(elem_ptr, fill, src_type_size);
/* If there's no VL type of data, do conversion first then fill the data into
* the memory buffer. */
@@ -577,7 +578,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
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);
+ H5MM_memcpy(fb_info->fill_buf, fb_info->fill->buf, fb_info->file_elmt_size);
/* Reset first element of background buffer, if necessary */
if(H5T_path_bkg(fb_info->fill_to_mem_tpath))
@@ -603,7 +604,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
if(!buf)
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary fill buffer")
- HDmemcpy(buf, fb_info->fill_buf, fb_info->fill_buf_size);
+ H5MM_memcpy(buf, fb_info->fill_buf, fb_info->fill_buf_size);
/* Type convert the dataset buffer, to copy any VL components */
if(H5T_convert(fb_info->mem_to_dset_tpath, fb_info->mem_tid, fb_info->file_tid, nelmts, (size_t)0, (size_t)0, fb_info->fill_buf, fb_info->bkg_buf) < 0)