summaryrefslogtreecommitdiffstats
path: root/src/H5Tinit_float.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-08-25 20:56:50 (GMT)
committerGitHub <noreply@github.com>2023-08-25 20:56:50 (GMT)
commit627f7c5e026a55f176d8dfcab51633cf3b704ce6 (patch)
treeb8ef6ca645521104c25a7b5538259bb449d51c58 /src/H5Tinit_float.c
parent3dd60d914e762c6cf7d99646bc516015229176cd (diff)
downloadhdf5-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/H5Tinit_float.c')
-rw-r--r--src/H5Tinit_float.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Tinit_float.c b/src/H5Tinit_float.c
index efab5b6..3a8c0bd 100644
--- a/src/H5Tinit_float.c
+++ b/src/H5Tinit_float.c
@@ -79,11 +79,11 @@
* and interfere with detection of the various properties below unless we \
* know to ignore them. */ \
_v1 = (TYPE)4.0L; \
- memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ H5MM_memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
for (_i = 0; _i < (int)sizeof(TYPE); _i++) \
for (_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char)(_byte_mask << 1)) { \
_buf1[_i] ^= _byte_mask; \
- memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
+ H5MM_memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
H5_GCC_CLANG_DIAG_OFF("float-equal") \
if (_v1 != _v2) \
_pad_mask[_i] |= _byte_mask; \
@@ -96,8 +96,8 @@
_v3 = _v1; \
_v1 += _v2; \
_v2 /= (TYPE)256.0L; \
- memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
- memcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
+ H5MM_memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ H5MM_memcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
_j = H5T__byte_cmp(sizeof(TYPE), _buf3, _buf1, _pad_mask); \
if (_j >= 0) { \
INFO.perm[_i] = _j; \