diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-08-25 20:56:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 20:56:50 (GMT) |
commit | 627f7c5e026a55f176d8dfcab51633cf3b704ce6 (patch) | |
tree | b8ef6ca645521104c25a7b5538259bb449d51c58 /src/H5FDsubfiling/H5FDioc.c | |
parent | 3dd60d914e762c6cf7d99646bc516015229176cd (diff) | |
download | hdf5-627f7c5e026a55f176d8dfcab51633cf3b704ce6.zip hdf5-627f7c5e026a55f176d8dfcab51633cf3b704ce6.tar.gz hdf5-627f7c5e026a55f176d8dfcab51633cf3b704ce6.tar.bz2 |
Convert some H5MM calls to standard C equivalents (#2382)
* H5MM_calloc and malloc are now mapped to stdlib C calls
* H5MM_memcpy now maps directly to memcpy in release builds
* H5MM_memcpy is still implemented as a separate function that
checks for buffer overlap when H5MM_DEBUG is defined
(default w/ debug builds)
* Switches many library memcpy calls to use H5MM_memcpy
* Fixes a possible zero allocation in H5Olayout.c
Diffstat (limited to 'src/H5FDsubfiling/H5FDioc.c')
-rw-r--r-- | src/H5FDsubfiling/H5FDioc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c index 81ad0e7..570c747 100644 --- a/src/H5FDsubfiling/H5FDioc.c +++ b/src/H5FDsubfiling/H5FDioc.c @@ -399,7 +399,7 @@ H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out) } else { /* Copy the IOC fapl data out */ - memcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t)); + H5MM_memcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t)); } done: @@ -666,7 +666,7 @@ H5FD__ioc_fapl_copy(const void *_old_fa) if (NULL == new_fa_ptr) H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL"); - memcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t)); + H5MM_memcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t)); ret_value = (void *)new_fa_ptr; @@ -790,7 +790,7 @@ H5FD__ioc_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) } /* Fill in the file config values */ - memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t)); + H5MM_memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t)); /* Fully resolve the given filepath and get its dirname */ if (H5_resolve_pathname(name, file_ptr->comm, &file_ptr->file_path) < 0) |