summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5.c2
-rw-r--r--src/H5Adense.c6
-rw-r--r--src/H5Aint.c8
-rw-r--r--src/H5B.c35
-rw-r--r--src/H5B2cache.c10
-rw-r--r--src/H5B2hdr.c2
-rw-r--r--src/H5B2int.c92
-rw-r--r--src/H5B2internal.c4
-rw-r--r--src/H5B2leaf.c18
-rw-r--r--src/H5Bcache.c6
-rw-r--r--src/H5C.c2
-rw-r--r--src/H5CS.c2
-rw-r--r--src/H5CX.c14
-rw-r--r--src/H5Centry.c12
-rw-r--r--src/H5Cimage.c6
-rw-r--r--src/H5Clog_json.c2
-rw-r--r--src/H5Clog_trace.c2
-rw-r--r--src/H5Cmpio.c6
-rw-r--r--src/H5Dbtree.c10
-rw-r--r--src/H5Dchunk.c52
-rw-r--r--src/H5Dcompact.c4
-rw-r--r--src/H5Dcontig.c10
-rw-r--r--src/H5Dearray.c4
-rw-r--r--src/H5Defl.c2
-rw-r--r--src/H5Dfarray.c4
-rw-r--r--src/H5Dfill.c10
-rw-r--r--src/H5Dint.c8
-rw-r--r--src/H5Dio.c4
-rw-r--r--src/H5Dmpio.c14
-rw-r--r--src/H5Dnone.c2
-rw-r--r--src/H5Doh.c2
-rw-r--r--src/H5Dscatgath.c10
-rw-r--r--src/H5Dsingle.c2
-rw-r--r--src/H5Dvirtual.c16
-rw-r--r--src/H5EAcache.c14
-rw-r--r--src/H5EAhdr.c4
-rw-r--r--src/H5Eint.c2
-rw-r--r--src/H5FAcache.c6
-rw-r--r--src/H5FDcore.c18
-rw-r--r--src/H5FDdirect.c12
-rw-r--r--src/H5FDint.c2
-rw-r--r--src/H5FDlog.c18
-rw-r--r--src/H5FDmirror.c6
-rw-r--r--src/H5FDmpi.c2
-rw-r--r--src/H5FDmpio.c20
-rw-r--r--src/H5FDonion.c10
-rw-r--r--src/H5FDonion_header.c16
-rw-r--r--src/H5FDonion_history.c12
-rw-r--r--src/H5FDonion_index.c42
-rw-r--r--src/H5FDsec2.c6
-rw-r--r--src/H5FDsplitter.c2
-rw-r--r--src/H5FDsubfiling/H5FDioc.c8
-rw-r--r--src/H5FDsubfiling/H5FDioc_threads.c6
-rw-r--r--src/H5FDsubfiling/H5FDsubfiling.c26
-rw-r--r--src/H5FDsubfiling/H5subfiling_common.c8
-rw-r--r--src/H5FL.c30
-rw-r--r--src/H5FScache.c4
-rw-r--r--src/H5Faccum.c22
-rw-r--r--src/H5Fcwfs.c6
-rw-r--r--src/H5Fint.c8
-rw-r--r--src/H5Fmount.c16
-rw-r--r--src/H5Fsuper.c2
-rw-r--r--src/H5Gcache.c4
-rw-r--r--src/H5Gdense.c6
-rw-r--r--src/H5Gdeprec.c2
-rw-r--r--src/H5Gent.c4
-rw-r--r--src/H5Gint.c4
-rw-r--r--src/H5Gname.c4
-rw-r--r--src/H5Gnode.c10
-rw-r--r--src/H5Gstab.c2
-rw-r--r--src/H5Gtraverse.c2
-rw-r--r--src/H5HFcache.c12
-rw-r--r--src/H5HFdblock.c4
-rw-r--r--src/H5HFiblock.c2
-rw-r--r--src/H5HFiter.c2
-rw-r--r--src/H5HFsection.c12
-rw-r--r--src/H5HFtiny.c2
-rw-r--r--src/H5HG.c10
-rw-r--r--src/H5HGcache.c4
-rw-r--r--src/H5HL.c2
-rw-r--r--src/H5HLcache.c8
-rw-r--r--src/H5Lint.c4
-rw-r--r--src/H5MF.c16
-rw-r--r--src/H5MM.c2
-rw-r--r--src/H5Oalloc.c72
-rw-r--r--src/H5Oattr.c8
-rw-r--r--src/H5Ocache.c22
-rw-r--r--src/H5Ochunk.c4
-rw-r--r--src/H5Ocopy.c4
-rw-r--r--src/H5Ocopy_ref.c10
-rw-r--r--src/H5Odbg.c2
-rw-r--r--src/H5Odeprec.c2
-rw-r--r--src/H5Oint.c12
-rw-r--r--src/H5Olayout.c2
-rw-r--r--src/H5Omessage.c4
-rw-r--r--src/H5Omtime.c2
-rw-r--r--src/H5Opline.c2
-rw-r--r--src/H5Opublic.h2
-rw-r--r--src/H5Oshared.h2
-rw-r--r--src/H5PB.c6
-rw-r--r--src/H5PLpath.c2
-rw-r--r--src/H5PLplugin_cache.c2
-rw-r--r--src/H5Pdapl.c4
-rw-r--r--src/H5Pdcpl.c8
-rw-r--r--src/H5Pfapl.c4
-rw-r--r--src/H5Pgcpl.c4
-rw-r--r--src/H5Pocpl.c2
-rw-r--r--src/H5R.c8
-rw-r--r--src/H5RS.c6
-rw-r--r--src/H5Rdeprec.c2
-rw-r--r--src/H5Rint.c4
-rw-r--r--src/H5S.c2
-rw-r--r--src/H5SM.c8
-rw-r--r--src/H5SMcache.c8
-rw-r--r--src/H5SMmessage.c4
-rw-r--r--src/H5Shyper.c18
-rw-r--r--src/H5Smpio.c6
-rw-r--r--src/H5Spoint.c10
-rw-r--r--src/H5Sselect.c6
-rw-r--r--src/H5T.c21
-rw-r--r--src/H5Tconv.c46
-rw-r--r--src/H5Tenum.c7
-rw-r--r--src/H5Tfields.c8
-rw-r--r--src/H5Tref.c12
-rw-r--r--src/H5Tvlen.c16
-rw-r--r--src/H5VLcallback.c4
-rw-r--r--src/H5VLnative.c2
-rw-r--r--src/H5VLnative_group.c2
-rw-r--r--src/H5VLnative_token.c2
-rw-r--r--src/H5VM.c2
-rw-r--r--src/H5VMprivate.h8
-rw-r--r--src/H5WB.c2
-rw-r--r--src/H5Z.c12
-rw-r--r--src/H5Zdeflate.c2
-rw-r--r--src/H5Znbit.c4
-rw-r--r--src/H5Zscaleoffset.c4
-rw-r--r--src/H5Ztrans.c4
-rw-r--r--src/H5encode.h4
-rw-r--r--src/H5mpi.c8
-rw-r--r--src/H5private.h12
-rw-r--r--src/H5timer.c2
141 files changed, 631 insertions, 646 deletions
diff --git a/src/H5.c b/src/H5.c
index c60cc1f..2abecd2 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -183,7 +183,7 @@ H5_init_library(void)
/*
* Make sure the package information is updated.
*/
- HDmemset(&H5_debug_g, 0, sizeof H5_debug_g);
+ memset(&H5_debug_g, 0, sizeof H5_debug_g);
H5_debug_g.pkg[H5_PKG_A].name = "a";
H5_debug_g.pkg[H5_PKG_AC].name = "ac";
H5_debug_g.pkg[H5_PKG_B].name = "b";
diff --git a/src/H5Adense.c b/src/H5Adense.c
index db3886f..248f5a7 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -177,7 +177,7 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Set fractal heap creation parameters */
/* XXX: Give some control of these to applications? */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5O_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5O_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5O_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -206,7 +206,7 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
#endif /* NDEBUG */
/* Create the name index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5A_BT2_NAME;
bt2_cparam.node_size = (size_t)H5A_NAME_BT2_NODE_SIZE;
bt2_cparam.rrec_size = 4 + /* Name's hash value */
@@ -225,7 +225,7 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Check if we should create a creation order index v2 B-tree */
if (ainfo->index_corder) {
/* Create the creation order index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5A_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5A_CORDER_BT2_NODE_SIZE;
bt2_cparam.rrec_size = 4 + /* Creation order index */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 64d4b4a..85739d0 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -710,7 +710,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
/* Check if the attribute has any data yet, if not, fill with zeroes */
if (attr->obj_opened && !attr->shared->data)
- HDmemset(buf, 0, (dst_type_size * nelmts));
+ memset(buf, 0, (dst_type_size * nelmts));
else { /* Attribute exists and has a value */
/* Convert memory buffer into disk buffer */
/* Set up type conversion function */
@@ -869,7 +869,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
/* Clear background buffer if it's not supposed to be initialized with file
* contents */
if (need_bkg == H5T_BKG_TEMP)
- HDmemset(bkg_buf, 0, dst_type_size * nelmts);
+ memset(bkg_buf, 0, dst_type_size * nelmts);
}
else if (NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed")
@@ -2281,7 +2281,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Set background buffer to all zeros */
if (bkg_buf)
- HDmemset(bkg_buf, 0, buf_size);
+ memset(bkg_buf, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0)
@@ -2424,7 +2424,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
} /* end if */
else
/* Reset value to zero */
- HDmemset(attr_dst->shared->data, 0, attr_dst->shared->data_size);
+ memset(attr_dst->shared->data, 0, attr_dst->shared->data_size);
} /* end if */
done:
diff --git a/src/H5B.c b/src/H5B.c
index aac60c7..f3a3f79 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -215,7 +215,7 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out
*/
if (NULL == (bt = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
- HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&bt->cache_info, 0, sizeof(H5AC_info_t));
bt->level = 0;
bt->left = HADDR_UNDEF;
bt->right = HADDR_UNDEF;
@@ -703,7 +703,7 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5
} /* end if */
else {
/* Make room for the new key */
- HDmemmove(base + shared->type->sizeof_nkey, base, (bt->nchildren - idx) * shared->type->sizeof_nkey);
+ memmove(base + shared->type->sizeof_nkey, base, (bt->nchildren - idx) * shared->type->sizeof_nkey);
H5MM_memcpy(base, md_key, shared->type->sizeof_nkey);
/* The MD_KEY is the left key of the new node */
@@ -711,7 +711,7 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5
idx++;
/* Make room for the new child address */
- HDmemmove(bt->child + idx + 1, bt->child + idx, (bt->nchildren - idx) * sizeof(haddr_t));
+ memmove(bt->child + idx + 1, bt->child + idx, (bt->nchildren - idx) * sizeof(haddr_t));
} /* end if */
bt->child[idx] = child;
@@ -1401,8 +1401,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
*/
if (type->critical_key == H5B_LEFT) {
/* Slide all keys down 1, update lt_key */
- HDmemmove(H5B_NKEY(bt, shared, 0), H5B_NKEY(bt, shared, 1),
- bt->nchildren * type->sizeof_nkey);
+ memmove(H5B_NKEY(bt, shared, 0), H5B_NKEY(bt, shared, 1), bt->nchildren * type->sizeof_nkey);
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
*lt_key_changed = TRUE;
}
@@ -1410,10 +1409,10 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
/* Slide all but the leftmost 2 keys down, leaving the leftmost
* key intact (the right key of the leftmost child is
* overwritten) */
- HDmemmove(H5B_NKEY(bt, shared, 1), H5B_NKEY(bt, shared, 2),
- (bt->nchildren - 1) * type->sizeof_nkey);
+ memmove(H5B_NKEY(bt, shared, 1), H5B_NKEY(bt, shared, 2),
+ (bt->nchildren - 1) * type->sizeof_nkey);
- HDmemmove(bt->child, bt->child + 1, (bt->nchildren - 1) * sizeof(haddr_t));
+ memmove(bt->child, bt->child + 1, (bt->nchildren - 1) * sizeof(haddr_t));
bt->nchildren -= 1;
bt_flags |= H5AC__DIRTIED_FLAG;
@@ -1428,8 +1427,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
if (type->critical_key == H5B_LEFT)
/* Slide the rightmost key down one, overwriting the left key of
* the deleted (rightmost) child */
- HDmemmove(H5B_NKEY(bt, shared, bt->nchildren - 1), H5B_NKEY(bt, shared, bt->nchildren),
- type->sizeof_nkey);
+ memmove(H5B_NKEY(bt, shared, bt->nchildren - 1), H5B_NKEY(bt, shared, bt->nchildren),
+ type->sizeof_nkey);
else {
/* Just update rt_key */
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren - 1), type->sizeof_nkey);
@@ -1449,13 +1448,13 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
* Return H5B_INS_NOOP.
*/
if (type->critical_key == H5B_LEFT)
- HDmemmove(H5B_NKEY(bt, shared, idx), H5B_NKEY(bt, shared, idx + 1),
- (bt->nchildren - idx) * type->sizeof_nkey);
+ memmove(H5B_NKEY(bt, shared, idx), H5B_NKEY(bt, shared, idx + 1),
+ (bt->nchildren - idx) * type->sizeof_nkey);
else
- HDmemmove(H5B_NKEY(bt, shared, idx + 1), H5B_NKEY(bt, shared, idx + 2),
- (bt->nchildren - 1 - idx) * type->sizeof_nkey);
+ memmove(H5B_NKEY(bt, shared, idx + 1), H5B_NKEY(bt, shared, idx + 2),
+ (bt->nchildren - 1 - idx) * type->sizeof_nkey);
- HDmemmove(bt->child + idx, bt->child + idx + 1, (bt->nchildren - 1 - idx) * sizeof(haddr_t));
+ memmove(bt->child + idx, bt->child + idx + 1, (bt->nchildren - 1 - idx) * sizeof(haddr_t));
bt->nchildren -= 1;
bt_flags |= H5AC__DIRTIED_FLAG;
@@ -1662,7 +1661,7 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
/* Allocate and clear shared buffers */
if (NULL == (shared->page = H5FL_BLK_MALLOC(page, shared->sizeof_rnode)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page")
- HDmemset(shared->page, 0, shared->sizeof_rnode);
+ memset(shared->page, 0, shared->sizeof_rnode);
if (NULL == (shared->nkey = H5FL_SEQ_MALLOC(size_t, (size_t)(shared->two_k + 1))))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys")
@@ -1750,7 +1749,7 @@ H5B__copy(const H5B_t *old_bt)
H5MM_memcpy(new_node, old_bt, sizeof(H5B_t));
/* Reset cache info */
- HDmemset(&new_node->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&new_node->cache_info, 0, sizeof(H5AC_info_t));
if (NULL == (new_node->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
NULL == (new_node->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
@@ -1907,7 +1906,7 @@ H5B_get_info(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_info_t *bt_inf
assert(udata);
/* Portably initialize B-tree info struct */
- HDmemset(bt_info, 0, sizeof(*bt_info));
+ memset(bt_info, 0, sizeof(*bt_info));
/* Set up internal user-data for the B-tree 'get info' helper routine */
info_udata.bt_info = bt_info;
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 9aa6ade..5fe7fd8 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -242,7 +242,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "allocation failed for B-tree header")
/* Magic number */
- if (HDmemcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature")
image += H5_SIZEOF_MAGIC;
@@ -620,7 +620,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
internal->shadow_epoch = udata->hdr->shadow_epoch;
/* Magic number */
- if (HDmemcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node signature")
image += H5_SIZEOF_MAGIC;
@@ -800,7 +800,7 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of internal node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1016,7 +1016,7 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
leaf->shadow_epoch = udata->hdr->shadow_epoch;
/* Magic number */
- if (HDmemcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree leaf node signature")
image += H5_SIZEOF_MAGIC;
@@ -1159,7 +1159,7 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of leaf node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 1df02fd..6c07835 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -129,7 +129,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/* Allocate "page" for node I/O */
if (NULL == (hdr->page = H5FL_BLK_MALLOC(node_page, hdr->node_size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(hdr->page, 0, hdr->node_size);
+ memset(hdr->page, 0, hdr->node_size);
/* Allocate array of node info structs */
if (NULL == (hdr->node_info = H5FL_SEQ_MALLOC(H5B2_node_info_t, (size_t)(hdr->depth + 1))))
diff --git a/src/H5B2int.c b/src/H5B2int.c
index c30ecce..e9238c9 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -151,10 +151,10 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
/* Slide records in parent node up one space, to make room for promoted record */
if (idx < internal->nrec) {
- HDmemmove(H5B2_INT_NREC(internal, hdr, idx + 1), H5B2_INT_NREC(internal, hdr, idx),
- hdr->cls->nrec_size * (internal->nrec - idx));
- HDmemmove(&(internal->node_ptrs[idx + 2]), &(internal->node_ptrs[idx + 1]),
- sizeof(H5B2_node_ptr_t) * (internal->nrec - idx));
+ memmove(H5B2_INT_NREC(internal, hdr, idx + 1), H5B2_INT_NREC(internal, hdr, idx),
+ hdr->cls->nrec_size * (internal->nrec - idx));
+ memmove(&(internal->node_ptrs[idx + 2]), &(internal->node_ptrs[idx + 1]),
+ sizeof(H5B2_node_ptr_t) * (internal->nrec - idx));
} /* end if */
/* Check for the kind of B-tree node to split */
@@ -521,8 +521,8 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
hdr->cls->nrec_size);
/* Slide records in right node down */
- HDmemmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, move_nrec),
- hdr->cls->nrec_size * new_right_nrec);
+ memmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, move_nrec),
+ hdr->cls->nrec_size * new_right_nrec);
/* Handle node pointers, if we have an internal node */
if (depth > 1) {
@@ -540,8 +540,8 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
sizeof(H5B2_node_ptr_t) * move_nrec);
/* Slide node pointers in right node down */
- HDmemmove(&(right_node_ptrs[0]), &(right_node_ptrs[move_nrec]),
- sizeof(H5B2_node_ptr_t) * (new_right_nrec + (unsigned)1));
+ memmove(&(right_node_ptrs[0]), &(right_node_ptrs[move_nrec]),
+ sizeof(H5B2_node_ptr_t) * (new_right_nrec + (unsigned)1));
} /* end if */
/* Update flush dependencies for grandchildren, if using SWMR */
@@ -571,8 +571,8 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
assert(*left_nrec > *right_nrec);
/* Slide records in right node up */
- HDmemmove(H5B2_NAT_NREC(right_native, hdr, move_nrec), H5B2_NAT_NREC(right_native, hdr, 0),
- hdr->cls->nrec_size * (*right_nrec));
+ memmove(H5B2_NAT_NREC(right_native, hdr, move_nrec), H5B2_NAT_NREC(right_native, hdr, 0),
+ hdr->cls->nrec_size * (*right_nrec));
/* Copy record from parent node down into right child */
H5MM_memcpy(H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)), H5B2_INT_NREC(internal, hdr, idx),
@@ -594,8 +594,8 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
unsigned u; /* Local index variable */
/* Slide node pointers in right node up */
- HDmemmove(&(right_node_ptrs[move_nrec]), &(right_node_ptrs[0]),
- sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
+ memmove(&(right_node_ptrs[move_nrec]), &(right_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
/* Copy node pointers from left node to right */
H5MM_memcpy(&(right_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]),
@@ -813,9 +813,9 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
moved_middle_nrec++;
/* Slide records in middle node down */
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0),
- H5B2_NAT_NREC(middle_native, hdr, moved_middle_nrec),
- hdr->cls->nrec_size * (size_t)(*middle_nrec - moved_middle_nrec));
+ memmove(H5B2_NAT_NREC(middle_native, hdr, 0),
+ H5B2_NAT_NREC(middle_native, hdr, moved_middle_nrec),
+ hdr->cls->nrec_size * (size_t)(*middle_nrec - moved_middle_nrec));
/* Move node pointers also if this is an internal node */
if (depth > 1) {
@@ -835,8 +835,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
middle_moved_nrec -= (hssize_t)(moved_nrec + move_nptrs);
/* Slide the node pointers in middle node down */
- HDmemmove(&(middle_node_ptrs[0]), &(middle_node_ptrs[move_nptrs]),
- sizeof(H5B2_node_ptr_t) * ((*middle_nrec - move_nptrs) + 1));
+ memmove(&(middle_node_ptrs[0]), &(middle_node_ptrs[move_nptrs]),
+ sizeof(H5B2_node_ptr_t) * ((*middle_nrec - move_nptrs) + 1));
} /* end if */
/* Update flush dependencies for grandchildren, if using SWMR */
@@ -860,8 +860,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
(unsigned)(new_right_nrec - *right_nrec); /* Number of records to move out of right node */
/* Slide records in right node up */
- HDmemmove(H5B2_NAT_NREC(right_native, hdr, right_nrec_move), H5B2_NAT_NREC(right_native, hdr, 0),
- hdr->cls->nrec_size * (*right_nrec));
+ memmove(H5B2_NAT_NREC(right_native, hdr, right_nrec_move), H5B2_NAT_NREC(right_native, hdr, 0),
+ hdr->cls->nrec_size * (*right_nrec));
/* Move right parent record down to right node */
H5MM_memcpy(H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1),
@@ -884,8 +884,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
unsigned u; /* Local index variable */
/* Slide the node pointers in right node up */
- HDmemmove(&(right_node_ptrs[right_nrec_move]), &(right_node_ptrs[0]),
- sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
+ memmove(&(right_node_ptrs[right_nrec_move]), &(right_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
/* Move middle node pointers into right node */
H5MM_memcpy(&(right_node_ptrs[0]),
@@ -920,8 +920,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
(unsigned)(*left_nrec - new_left_nrec); /* Number of records to move out of left node */
/* Slide middle records up */
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move), H5B2_NAT_NREC(middle_native, hdr, 0),
- hdr->cls->nrec_size * curr_middle_nrec);
+ memmove(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move), H5B2_NAT_NREC(middle_native, hdr, 0),
+ hdr->cls->nrec_size * curr_middle_nrec);
/* Move left parent record down to middle node */
H5MM_memcpy(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move - 1),
@@ -929,9 +929,9 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
/* Move left records to middle node */
if (left_nrec_move > 1)
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0),
- H5B2_NAT_NREC(left_native, hdr, new_left_nrec + 1),
- hdr->cls->nrec_size * (left_nrec_move - 1));
+ memmove(H5B2_NAT_NREC(middle_native, hdr, 0),
+ H5B2_NAT_NREC(left_native, hdr, new_left_nrec + 1),
+ hdr->cls->nrec_size * (left_nrec_move - 1));
/* Move left parent record up from left node */
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(left_native, hdr, new_left_nrec),
@@ -943,8 +943,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
unsigned u; /* Local index variable */
/* Slide the node pointers in middle node up */
- HDmemmove(&(middle_node_ptrs[left_nrec_move]), &(middle_node_ptrs[0]),
- sizeof(H5B2_node_ptr_t) * (size_t)(curr_middle_nrec + 1));
+ memmove(&(middle_node_ptrs[left_nrec_move]), &(middle_node_ptrs[0]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(curr_middle_nrec + 1));
/* Move left node pointers into middle node */
H5MM_memcpy(&(middle_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]),
@@ -981,16 +981,16 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
/* Move right records to middle node */
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec + 1)),
- H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (right_nrec_move - 1));
+ memmove(H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec + 1)),
+ H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (right_nrec_move - 1));
/* Move right parent record up from right node */
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx),
H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1), hdr->cls->nrec_size);
/* Slide right records down */
- HDmemmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, right_nrec_move),
- hdr->cls->nrec_size * new_right_nrec);
+ memmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, right_nrec_move),
+ hdr->cls->nrec_size * new_right_nrec);
/* Move node pointers also if this is an internal node */
if (depth > 1) {
@@ -1008,8 +1008,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
middle_moved_nrec += (hssize_t)(moved_nrec + right_nrec_move);
/* Slide the node pointers in right node down */
- HDmemmove(&(right_node_ptrs[0]), &(right_node_ptrs[right_nrec_move]),
- sizeof(H5B2_node_ptr_t) * (size_t)(new_right_nrec + 1));
+ memmove(&(right_node_ptrs[0]), &(right_node_ptrs[right_nrec_move]),
+ sizeof(H5B2_node_ptr_t) * (size_t)(new_right_nrec + 1));
} /* end if */
/* Update flush dependencies for grandchildren, if using SWMR */
@@ -1218,10 +1218,10 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
/* Slide records in parent node down, to eliminate demoted record */
if ((idx + 1) < internal->nrec) {
- HDmemmove(H5B2_INT_NREC(internal, hdr, idx), H5B2_INT_NREC(internal, hdr, idx + 1),
- hdr->cls->nrec_size * (internal->nrec - (idx + 1)));
- HDmemmove(&(internal->node_ptrs[idx + 1]), &(internal->node_ptrs[idx + 2]),
- sizeof(H5B2_node_ptr_t) * (internal->nrec - (idx + 1)));
+ memmove(H5B2_INT_NREC(internal, hdr, idx), H5B2_INT_NREC(internal, hdr, idx + 1),
+ hdr->cls->nrec_size * (internal->nrec - (idx + 1)));
+ memmove(&(internal->node_ptrs[idx + 1]), &(internal->node_ptrs[idx + 2]),
+ sizeof(H5B2_node_ptr_t) * (internal->nrec - (idx + 1)));
} /* end if */
/* Update # of records in parent node */
@@ -1396,8 +1396,8 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
H5B2_NAT_NREC(middle_native, hdr, (middle_nrec_move - 1)), hdr->cls->nrec_size);
/* Slide records in middle node down */
- HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, middle_nrec_move),
- hdr->cls->nrec_size * (*middle_nrec - middle_nrec_move));
+ memmove(H5B2_NAT_NREC(middle_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, middle_nrec_move),
+ hdr->cls->nrec_size * (*middle_nrec - middle_nrec_move));
/* Move node pointers also if this is an internal node */
if (depth > 1) {
@@ -1412,8 +1412,8 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
middle_moved_nrec += middle_node_ptrs[u].all_nrec;
/* Slide the node pointers in middle node down */
- HDmemmove(&(middle_node_ptrs[0]), &(middle_node_ptrs[middle_nrec_move]),
- sizeof(H5B2_node_ptr_t) * (size_t)((unsigned)(*middle_nrec + 1) - middle_nrec_move));
+ memmove(&(middle_node_ptrs[0]), &(middle_node_ptrs[middle_nrec_move]),
+ sizeof(H5B2_node_ptr_t) * (size_t)((unsigned)(*middle_nrec + 1) - middle_nrec_move));
} /* end if */
/* Update flush dependencies for grandchildren, if using SWMR */
@@ -1475,10 +1475,10 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
/* Slide records in parent node down, to eliminate demoted record */
if ((idx + 1) < internal->nrec) {
- HDmemmove(H5B2_INT_NREC(internal, hdr, idx), H5B2_INT_NREC(internal, hdr, idx + 1),
- hdr->cls->nrec_size * (internal->nrec - (idx + 1)));
- HDmemmove(&(internal->node_ptrs[idx + 1]), &(internal->node_ptrs[idx + 2]),
- sizeof(H5B2_node_ptr_t) * (internal->nrec - (idx + 1)));
+ memmove(H5B2_INT_NREC(internal, hdr, idx), H5B2_INT_NREC(internal, hdr, idx + 1),
+ hdr->cls->nrec_size * (internal->nrec - (idx + 1)));
+ memmove(&(internal->node_ptrs[idx + 1]), &(internal->node_ptrs[idx + 2]),
+ sizeof(H5B2_node_ptr_t) * (internal->nrec - (idx + 1)));
} /* end if */
/* Update # of records in parent node */
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index 205d0b7..e3f1cf9 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -104,14 +104,14 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
if (NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for B-tree internal native keys")
- HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
+ memset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
/* Allocate space for the node pointers in memory */
if (NULL ==
(internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for B-tree internal node pointers")
- HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
+ memset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
/* Set depth of the node */
internal->depth = depth;
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index 0297153..ff6cb9e 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -103,7 +103,7 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
/* Allocate space for the native keys in memory */
if (NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[0].nat_rec_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys")
- HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
+ memset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
/* Set parent */
leaf->parent = parent;
@@ -360,8 +360,8 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
/* Make room for new record */
if (idx < leaf->nrec)
- HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx + 1), H5B2_LEAF_NREC(leaf, hdr, idx),
- hdr->cls->nrec_size * (leaf->nrec - idx));
+ memmove(H5B2_LEAF_NREC(leaf, hdr, idx + 1), H5B2_LEAF_NREC(leaf, hdr, idx),
+ hdr->cls->nrec_size * (leaf->nrec - idx));
} /* end else */
/* Make callback to store record in native form */
@@ -479,8 +479,8 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
/* Make room for new record */
if (idx < leaf->nrec)
- HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx + 1), H5B2_LEAF_NREC(leaf, hdr, idx),
- hdr->cls->nrec_size * (leaf->nrec - idx));
+ memmove(H5B2_LEAF_NREC(leaf, hdr, idx + 1), H5B2_LEAF_NREC(leaf, hdr, idx),
+ hdr->cls->nrec_size * (leaf->nrec - idx));
} /* end if */
} /* end else */
@@ -801,8 +801,8 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
/* Pack record out of leaf */
if (idx < leaf->nrec)
- HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx), H5B2_LEAF_NREC(leaf, hdr, (idx + 1)),
- hdr->cls->nrec_size * (leaf->nrec - idx));
+ memmove(H5B2_LEAF_NREC(leaf, hdr, idx), H5B2_LEAF_NREC(leaf, hdr, (idx + 1)),
+ hdr->cls->nrec_size * (leaf->nrec - idx));
/* Mark leaf node as dirty also */
leaf_flags |= H5AC__DIRTIED_FLAG;
@@ -899,8 +899,8 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n
/* Pack record out of leaf */
if (idx < leaf->nrec)
- HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx), H5B2_LEAF_NREC(leaf, hdr, (idx + 1)),
- hdr->cls->nrec_size * (leaf->nrec - idx));
+ memmove(H5B2_LEAF_NREC(leaf, hdr, idx), H5B2_LEAF_NREC(leaf, hdr, (idx + 1)),
+ hdr->cls->nrec_size * (leaf->nrec - idx));
/* Mark leaf node as dirty also */
leaf_flags |= H5AC__DIRTIED_FLAG;
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 692b1ce..ada63ae 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -138,7 +138,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_
/* Allocate the B-tree node in memory */
if (NULL == (bt = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate B-tree struct")
- HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&bt->cache_info, 0, sizeof(H5AC_info_t));
/* Set & increment the ref-counted "shared" B-tree information for the node */
bt->rc_shared = udata->rc_shared;
@@ -158,7 +158,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_BTREE, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree signature")
image += H5_SIZEOF_MAGIC;
@@ -325,7 +325,7 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo
assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5C.c b/src/H5C.c
index af478d4..10fd48b 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -302,7 +302,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->epoch_marker_ringbuf_size = 0;
/* Initialize all epoch marker entries' fields to zero/FALSE/NULL */
- HDmemset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
+ memset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
/* Set non-zero/FALSE/NULL fields for epoch markers */
for (i = 0; i < H5C__MAX_EPOCH_MARKERS; i++) {
diff --git a/src/H5CS.c b/src/H5CS.c
index dd9f9b1..66ac0d7 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -248,7 +248,7 @@ H5CS_copy_stack(void)
/* Copy pointers on old stack to new one */
/* (Strings don't need to be duplicated, they are statically allocated) */
- HDmemcpy(new_stack->rec, old_stack->rec, sizeof(char *) * old_stack->nused);
+ memcpy(new_stack->rec, old_stack->rec, sizeof(char *) * old_stack->nused);
new_stack->nused = new_stack->nalloc = old_stack->nused;
/* Set the return value */
diff --git a/src/H5CX.c b/src/H5CX.c
index 04e77d3..b2ddbc1 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -488,7 +488,7 @@ H5CX_init(void)
FUNC_ENTER_NOAPI(FAIL)
/* Reset the "default DXPL cache" information */
- HDmemset(&H5CX_def_dxpl_cache, 0, sizeof(H5CX_dxpl_cache_t));
+ memset(&H5CX_def_dxpl_cache, 0, sizeof(H5CX_dxpl_cache_t));
/* Get the default DXPL cache information */
@@ -585,7 +585,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve modify write buffer property")
/* Reset the "default LCPL cache" information */
- HDmemset(&H5CX_def_lcpl_cache, 0, sizeof(H5CX_lcpl_cache_t));
+ memset(&H5CX_def_lcpl_cache, 0, sizeof(H5CX_lcpl_cache_t));
/* Get the default LCPL cache information */
@@ -602,7 +602,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve intermediate group creation flag")
/* Reset the "default LAPL cache" information */
- HDmemset(&H5CX_def_lapl_cache, 0, sizeof(H5CX_lapl_cache_t));
+ memset(&H5CX_def_lapl_cache, 0, sizeof(H5CX_lapl_cache_t));
/* Get the default LAPL cache information */
@@ -615,7 +615,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve number of soft / UD links to traverse")
/* Reset the "default DCPL cache" information */
- HDmemset(&H5CX_def_dcpl_cache, 0, sizeof(H5CX_dcpl_cache_t));
+ memset(&H5CX_def_dcpl_cache, 0, sizeof(H5CX_dcpl_cache_t));
/* Get the default DCPL cache information */
@@ -632,7 +632,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve object header flags")
/* Reset the "default DAPL cache" information */
- HDmemset(&H5CX_def_dapl_cache, 0, sizeof(H5CX_dapl_cache_t));
+ memset(&H5CX_def_dapl_cache, 0, sizeof(H5CX_dapl_cache_t));
/* Get the default DAPL cache information */
@@ -649,7 +649,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve prefix for VDS")
/* Reset the "default FAPL cache" information */
- HDmemset(&H5CX_def_fapl_cache, 0, sizeof(H5CX_fapl_cache_t));
+ memset(&H5CX_def_fapl_cache, 0, sizeof(H5CX_fapl_cache_t));
/* Get the default FAPL cache information */
@@ -1629,7 +1629,7 @@ H5CX_get_vol_connector_prop(H5VL_connector_prop_t *vol_connector_prop)
/* Get the value */
H5MM_memcpy(vol_connector_prop, &(*head)->ctx.vol_connector_prop, sizeof(H5VL_connector_prop_t));
else
- HDmemset(vol_connector_prop, 0, sizeof(H5VL_connector_prop_t));
+ memset(vol_connector_prop, 0, sizeof(H5VL_connector_prop_t));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_get_vol_connector_prop() */
diff --git a/src/H5Centry.c b/src/H5Centry.c
index 994487e..b1f02b2 100644
--- a/src/H5Centry.c
+++ b/src/H5Centry.c
@@ -374,8 +374,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to serialize entry")
#if H5C_DO_MEMORY_SANITY_CHECKS
- assert(0 == HDmemcmp(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE,
- H5C_IMAGE_EXTRA_SPACE));
+ assert(0 == memcmp(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE,
+ H5C_IMAGE_EXTRA_SPACE));
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
entry_ptr->image_up_to_date = TRUE;
@@ -1076,7 +1076,7 @@ H5C__load_entry(H5F_t *f,
#ifdef H5_HAVE_PARALLEL
if (coll_access) {
/* Push an error, but still participate in following MPI_Bcast */
- HDmemset(image, 0, len);
+ memset(image, 0, len);
HDONE_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*")
}
else
@@ -1134,7 +1134,7 @@ H5C__load_entry(H5F_t *f,
#ifdef H5_HAVE_PARALLEL
if (coll_access) {
/* Push an error, but still participate in following MPI_Bcast */
- HDmemset(image + len, 0, actual_len - len);
+ memset(image + len, 0, actual_len - len);
HDONE_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image")
}
else
@@ -3954,8 +3954,8 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
/* Remove parent entry from child's parent array */
if (u < (child_entry->flush_dep_nparents - 1))
- HDmemmove(&child_entry->flush_dep_parent[u], &child_entry->flush_dep_parent[u + 1],
- (child_entry->flush_dep_nparents - u - 1) * sizeof(child_entry->flush_dep_parent[0]));
+ memmove(&child_entry->flush_dep_parent[u], &child_entry->flush_dep_parent[u + 1],
+ (child_entry->flush_dep_nparents - u - 1) * sizeof(child_entry->flush_dep_parent[0]));
child_entry->flush_dep_nparents--;
/* Adjust parent entry's nchildren and unpin parent if it goes to zero */
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index f8eef6b..0bdd9b9 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -351,8 +351,8 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
assert(cache_ptr->image_entries[u].image_ptr);
assert(fake_cache_ptr->image_entries[u].image_ptr);
- assert(!HDmemcmp(cache_ptr->image_entries[u].image_ptr,
- fake_cache_ptr->image_entries[u].image_ptr, cache_ptr->image_entries[u].size));
+ assert(!memcmp(cache_ptr->image_entries[u].image_ptr, fake_cache_ptr->image_entries[u].image_ptr,
+ cache_ptr->image_entries[u].size));
fake_cache_ptr->image_entries[u].image_ptr =
H5MM_xfree(fake_cache_ptr->image_entries[u].image_ptr);
@@ -1286,7 +1286,7 @@ H5C__decode_cache_image_header(const H5F_t *f, H5C_t *cache_ptr, const uint8_t *
p = *buf;
/* Check signature */
- if (HDmemcmp(p, H5C__MDCI_BLOCK_SIGNATURE, (size_t)H5C__MDCI_BLOCK_SIGNATURE_LEN) != 0)
+ if (memcmp(p, H5C__MDCI_BLOCK_SIGNATURE, (size_t)H5C__MDCI_BLOCK_SIGNATURE_LEN) != 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache image header signature")
p += H5C__MDCI_BLOCK_SIGNATURE_LEN;
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c
index 44eaa93..64aa0a4 100644
--- a/src/H5Clog_json.c
+++ b/src/H5Clog_json.c
@@ -171,7 +171,7 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata)
n_chars = HDstrlen(json_udata->message);
if ((int)n_chars != fprintf(json_udata->outfile, "%s", json_udata->message))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message")
- HDmemset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char)));
+ memset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char)));
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c
index 5889d1d..4d8e6a8 100644
--- a/src/H5Clog_trace.c
+++ b/src/H5Clog_trace.c
@@ -166,7 +166,7 @@ H5C__trace_write_log_message(H5C_log_trace_udata_t *trace_udata)
n_chars = HDstrlen(trace_udata->message);
if ((int)n_chars != fprintf(trace_udata->outfile, "%s", trace_udata->message))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message")
- HDmemset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char)));
+ memset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char)));
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index d423c9e..d5fa05d 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -186,13 +186,13 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
assert(mpi_rank < mpi_size);
/* Initialize the entries_to_flush and entries_to_clear arrays */
- HDmemset(entries_to_flush, 0, sizeof(entries_to_flush));
- HDmemset(entries_to_clear, 0, sizeof(entries_to_clear));
+ memset(entries_to_flush, 0, sizeof(entries_to_flush));
+ memset(entries_to_clear, 0, sizeof(entries_to_clear));
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
fprintf(stdout, "%s:%d: setting up candidate assignment table.\n", __func__, mpi_rank);
- HDmemset(tbl_buf, 0, sizeof(tbl_buf));
+ memset(tbl_buf, 0, sizeof(tbl_buf));
HDsnprintf(tbl_buf, sizeof(tbl_buf), "candidate list = ");
for (u = 0; u < num_candidates; u++)
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index d29fcca..b82fdf7 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -1028,7 +1028,7 @@ H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t c
assert(chunk_udata);
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
udata.cb = chunk_cb;
@@ -1114,7 +1114,7 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
/* Set up B-tree user data */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.layout = idx_info->layout;
udata.storage = &tmp_storage;
@@ -1234,7 +1234,7 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
assert(index_size);
/* Initialize B-tree node user-data */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.layout = idx_info->layout;
udata.storage = idx_info->storage;
@@ -1350,11 +1350,11 @@ H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, un
FUNC_ENTER_NOAPI(FAIL)
/* Reset "fake" storage info */
- HDmemset(&storage, 0, sizeof(storage));
+ memset(&storage, 0, sizeof(storage));
storage.idx_type = H5D_CHUNK_IDX_BTREE;
/* Reset "fake" layout info */
- HDmemset(&layout, 0, sizeof(layout));
+ memset(&layout, 0, sizeof(layout));
layout.ndims = ndims;
for (u = 0; u < ndims; u++)
layout.dim[u] = dim[u];
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 00639fd..a9f649e 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -1604,7 +1604,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Set initial chunk location, partial dimensions, etc */
num_partial_dims = 0;
- HDmemset(zeros, 0, sizeof(zeros));
+ memset(zeros, 0, sizeof(zeros));
for (u = 0; u < fm->f_ndims; u++) {
/* Validate this chunk dimension */
if (di->layout->u.chunk.dim[u] == 0)
@@ -2771,7 +2771,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up contiguous I/O info object */
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- HDmemcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
+ memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
ctg_dset_info.store = &ctg_store;
ctg_dset_info.layout_ops = *H5D_LOPS_CONTIG;
ctg_io_info.dsets_info = &ctg_dset_info;
@@ -2783,7 +2783,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up compact I/O info object */
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- HDmemcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
+ memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
cpt_dset_info.store = &cpt_store;
cpt_dset_info.layout_ops = *H5D_LOPS_COMPACT;
cpt_io_info.dsets_info = &cpt_dset_info;
@@ -2930,7 +2930,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up contiguous I/O info object */
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- HDmemcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
+ memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
ctg_dset_info.store = &ctg_store;
ctg_dset_info.layout_ops = *H5D_LOPS_CONTIG;
ctg_io_info.dsets_info = &ctg_dset_info;
@@ -2942,7 +2942,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up compact I/O info object */
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- HDmemcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
+ memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
cpt_dset_info.store = &cpt_store;
cpt_dset_info.layout_ops = *H5D_LOPS_COMPACT;
cpt_io_info.dsets_info = &cpt_dset_info;
@@ -3422,7 +3422,7 @@ H5D__chunk_dest(H5D_t *dset)
/* Release cache structures */
if (rdcc->slot)
rdcc->slot = H5FL_SEQ_FREE(H5D_rdcc_ent_ptr_t, rdcc->slot);
- HDmemset(rdcc, 0, sizeof(H5D_rdcc_t));
+ memset(rdcc, 0, sizeof(H5D_rdcc_t));
/* Compose chunked index info struct */
idx_info.f = dset->oloc.file;
@@ -4398,7 +4398,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* In the case that some dataset functions look through this data,
* clear it to all 0s. */
- HDmemset(chunk, 0, chunk_size);
+ memset(chunk, 0, chunk_size);
} /* end if */
else {
/*
@@ -4490,7 +4490,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, NULL, "can't refill fill value buffer")
} /* end if */
else
- HDmemset(chunk, 0, chunk_size);
+ memset(chunk, 0, chunk_size);
/* Increment # of creations */
rdcc->stats.ninits++;
@@ -4650,7 +4650,7 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
if (dirty) {
H5D_rdcc_ent_t fake_ent; /* "fake" chunk cache entry */
- HDmemset(&fake_ent, 0, sizeof(fake_ent));
+ memset(&fake_ent, 0, sizeof(fake_ent));
fake_ent.dirty = TRUE;
if (is_unfiltered_edge_chunk)
fake_ent.edge_chunk_state = H5D_RDCC_DISABLE_FILTERS;
@@ -4992,7 +4992,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
continue;
else {
/* Reset the chunk offset indices */
- HDmemset(scaled, 0, (space_ndims * sizeof(scaled[0])));
+ memset(scaled, 0, (space_ndims * sizeof(scaled[0])));
scaled[op_dim] = min_unalloc[op_dim];
if (has_unfilt_edge_chunks) {
@@ -5356,7 +5356,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
assert(max_edge_chunk_sc[op_dim] == old_edge_chunk_sc[op_dim]);
/* Reset the chunk offset indices */
- HDmemset(chunk_sc, 0, (space_ndims * sizeof(chunk_sc[0])));
+ memset(chunk_sc, 0, (space_ndims * sizeof(chunk_sc[0])));
chunk_sc[op_dim] = old_edge_chunk_sc[op_dim];
carry = FALSE;
@@ -5985,7 +5985,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Reset hyperslab start array */
/* (hyperslabs will always start from origin) */
- HDmemset(hyper_start, 0, sizeof(hyper_start));
+ memset(hyper_start, 0, sizeof(hyper_start));
/* Set up chunked I/O info object, for operations on chunks (in callback)
* Note that we only need to set scaled once, as the array's address
@@ -6007,7 +6007,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Initialize the user data for the iteration */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = &layout->u.chunk;
udata.common.storage = sc;
udata.common.scaled = scaled;
@@ -6032,8 +6032,8 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/*
* Determine the chunks which need to be filled or removed
*/
- HDmemset(min_mod_chunk_sc, 0, sizeof(min_mod_chunk_sc));
- HDmemset(max_mod_chunk_sc, 0, sizeof(max_mod_chunk_sc));
+ memset(min_mod_chunk_sc, 0, sizeof(min_mod_chunk_sc));
+ memset(max_mod_chunk_sc, 0, sizeof(max_mod_chunk_sc));
for (op_dim = 0; op_dim < (unsigned)space_ndims; op_dim++) {
/* Validate this chunk dimension */
if (chunk_dim[op_dim] == 0)
@@ -6099,7 +6099,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
assert(max_mod_chunk_sc[op_dim] >= min_mod_chunk_sc[op_dim]);
/* Reset the chunk offset indices */
- HDmemset(scaled, 0, (space_ndims * sizeof(scaled[0])));
+ memset(scaled, 0, (space_ndims * sizeof(scaled[0])));
scaled[op_dim] = min_mod_chunk_sc[op_dim];
/* Initialize "dims_outside_fill" array */
@@ -6302,7 +6302,7 @@ H5D__chunk_addrmap(const H5D_t *dset, haddr_t chunk_addr[])
assert(chunk_addr);
/* Set up user data for B-tree callback */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
udata.common.layout = &dset->shared->layout.u.chunk;
udata.common.storage = sc;
udata.chunk_addr = chunk_addr;
@@ -6360,7 +6360,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
pline_read = TRUE;
} /* end else if */
else
- HDmemset(&pline, 0, sizeof(pline));
+ memset(&pline, 0, sizeof(pline));
/* Retrieve dataset layout message */
if ((exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
@@ -6425,7 +6425,7 @@ H5D__chunk_update_cache(H5D_t *dset)
assert((dset->shared->layout.u.chunk.ndims - 1) > 1);
/* Add temporary entry list to rdcc */
- (void)HDmemset(&tmp_head, 0, sizeof(tmp_head));
+ (void)memset(&tmp_head, 0, sizeof(tmp_head));
rdcc->tmp_head = &tmp_head;
tmp_tail = &tmp_head;
@@ -6580,7 +6580,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
"memory allocation failed for raw data chunk")
udata->bkg = new_buf;
if (!udata->cpy_info->expand_ref)
- HDmemset((uint8_t *)udata->bkg + buf_size, 0, (size_t)(nbytes - buf_size));
+ memset((uint8_t *)udata->bkg + buf_size, 0, (size_t)(nbytes - buf_size));
bkg = udata->bkg;
} /* end if */
@@ -6669,7 +6669,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5MM_memcpy(reclaim_buf, buf, reclaim_buf_size);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, udata->nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -6803,7 +6803,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
/* Initialize the temporary pipeline info */
if (NULL == pline_src) {
- HDmemset(&_pline, 0, sizeof(_pline));
+ memset(&_pline, 0, sizeof(_pline));
pline = &_pline;
} /* end if */
else
@@ -6940,7 +6940,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
/* Check for reference datatype and no expanding references & clear background buffer */
if (!cpy_info->expand_ref && ((H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) && (f_src != f_dst)))
/* Reset value to zero */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
} /* end if */
/* Allocate memory for copying the chunk */
@@ -6948,7 +6948,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk")
/* Initialize the callback structure for the source */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = layout_src;
udata.common.storage = storage_src;
udata.file_src = f_src;
@@ -7070,7 +7070,7 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_
pline_read = TRUE;
} /* end else if */
else
- HDmemset(&pline, 0, sizeof(pline));
+ memset(&pline, 0, sizeof(pline));
/* Compose chunked index info struct */
idx_info.f = loc->file;
@@ -8216,7 +8216,7 @@ H5D__chunk_get_offset_copy(const H5D_t *dset, const hsize_t *offset, hsize_t *of
* So transfer the offset array to an internal offset array that we
* can properly terminate (handled via the memset call).
*/
- HDmemset(offset_copy, 0, H5O_LAYOUT_NDIMS * sizeof(hsize_t));
+ memset(offset_copy, 0, H5O_LAYOUT_NDIMS * sizeof(hsize_t));
for (u = 0; u < dset->shared->ndims; u++) {
/* Make sure the offset doesn't exceed the dataset's dimensions */
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index c255f7e..aec476a 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -590,7 +590,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
H5MM_memcpy(reclaim_buf, buf, buf_size);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -613,7 +613,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
} /* end if */
else
/* Reset value to zero */
- HDmemset(storage_dst->buf, 0, storage_src->size);
+ memset(storage_dst->buf, 0, storage_src->size);
} /* end if */
else
/* Type conversion not necessary */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 36ce31b..90d25d4 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -1267,7 +1267,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
/* Clear memory */
if (dset_contig->sieve_size > len)
- HDmemset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
+ memset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
/* Determine the new sieve buffer size & location */
dset_contig->sieve_loc = addr;
@@ -1352,8 +1352,8 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
/* Prepend to existing sieve buffer */
if ((addr + len) == sieve_start) {
/* Move existing sieve information to correct location */
- HDmemmove(dset_contig->sieve_buf + len, dset_contig->sieve_buf,
- dset_contig->sieve_size);
+ memmove(dset_contig->sieve_buf + len, dset_contig->sieve_buf,
+ dset_contig->sieve_size);
/* Copy in new information (must be first in sieve buffer) */
H5MM_memcpy(dset_contig->sieve_buf, buf, len);
@@ -1798,7 +1798,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
H5MM_memcpy(reclaim_buf, buf, mem_nbytes);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -1820,7 +1820,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
} /* end if */
else
/* Reset value to zero */
- HDmemset(buf, 0, src_nbytes);
+ memset(buf, 0, src_nbytes);
} /* end if */
/* Write raw data to destination file */
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index 61796a7..22c1306 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -1242,10 +1242,10 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5D_earray_it_ud_t udata; /* User data for iteration callback */
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
- HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
+ memset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if (!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 2d19d91..aea37a4 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -272,7 +272,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
if ((n = HDread(fd, buf, to_read)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file")
else if ((size_t)n < to_read)
- HDmemset(buf + n, 0, to_read - (size_t)n);
+ memset(buf + n, 0, to_read - (size_t)n);
full_name = (char *)H5MM_xfree(full_name);
HDclose(fd);
fd = -1;
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index 811ba24..7e44dbd 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -1122,10 +1122,10 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5D_farray_it_ud_t udata; /* User data for iteration callback */
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
- HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
+ memset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if (!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index 0a82412..84095c9 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -313,7 +313,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
assert(dset_type_id > 0);
/* Reset fill buffer information */
- HDmemset(fb_info, 0, sizeof(*fb_info));
+ memset(fb_info, 0, sizeof(*fb_info));
/* Cache constant information from the dataset */
fb_info->fill = fill;
@@ -451,13 +451,13 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
fb_info->fill_buf = caller_fill_buf;
fb_info->use_caller_fill_buf = TRUE;
- HDmemset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
+ memset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
else {
if (alloc_func) {
fb_info->fill_buf = alloc_func(fb_info->fill_buf_size, alloc_info);
- HDmemset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
+ memset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
else {
htri_t buf_avail = H5FL_BLK_AVAIL(
@@ -512,7 +512,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
/* Reset first element of background buffer, if necessary */
if (H5T_path_bkg(fb_info->fill_to_mem_tpath))
- HDmemset(fb_info->bkg_buf, 0, fb_info->max_elmt_size);
+ memset(fb_info->bkg_buf, 0, fb_info->max_elmt_size);
/* Type convert the dataset buffer, to copy any VL components */
if (H5T_convert(fb_info->fill_to_mem_tpath, fb_info->file_tid, fb_info->mem_tid, (size_t)1, (size_t)0,
@@ -526,7 +526,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
/* Reset the entire background buffer, if necessary */
if (H5T_path_bkg(fb_info->mem_to_dset_tpath))
- HDmemset(fb_info->bkg_buf, 0, fb_info->bkg_buf_size);
+ memset(fb_info->bkg_buf, 0, fb_info->bkg_buf_size);
/* Make a copy of the fill buffer so we can free dynamic elements after conversion */
if (fb_info->fill_alloc_func)
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 92f0237..b839abf 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -167,7 +167,7 @@ H5D_init(void)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Reset the "default dataset" information */
- HDmemset(&H5D_def_dset, 0, sizeof(H5D_shared_t));
+ memset(&H5D_def_dset, 0, sizeof(H5D_shared_t));
H5D_def_dset.type_id = H5I_INVALID_HID;
H5D_def_dset.dapl_id = H5I_INVALID_HID;
H5D_def_dset.dcpl_id = H5I_INVALID_HID;
@@ -1599,7 +1599,7 @@ H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id)
assert(dset->shared);
/* Set default append flush values */
- HDmemset(&dset->shared->append_flush, 0, sizeof(dset->shared->append_flush));
+ memset(&dset->shared->append_flush, 0, sizeof(dset->shared->append_flush));
/* If the dataset is chunked and there is a non-default DAPL */
if (dapl_id != H5P_DATASET_ACCESS_DEFAULT && dset->shared->layout.type == H5D_CHUNKED) {
@@ -2303,7 +2303,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"unable to allocate memory for compact dataset")
if (!full_overwrite)
- HDmemset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size);
+ memset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size);
layout->storage.u.compact.dirty = TRUE;
/* Indicate that we should initialize storage space */
@@ -3573,7 +3573,7 @@ H5D_get_create_plist(const H5D_t *dset)
switch (copied_layout.type) {
case H5D_COMPACT:
copied_layout.storage.u.compact.buf = H5MM_xfree(copied_layout.storage.u.compact.buf);
- HDmemset(&copied_layout.storage.u.compact, 0, sizeof(copied_layout.storage.u.compact));
+ memset(&copied_layout.storage.u.compact, 0, sizeof(copied_layout.storage.u.compact));
break;
case H5D_CONTIGUOUS:
diff --git a/src/H5Dio.c b/src/H5Dio.c
index c79332b..e7bfee1 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -896,7 +896,7 @@ H5D__ioinfo_init(size_t count, H5D_io_op_type_t op_type, H5D_dset_io_info_t *dse
assert(io_info);
/* Zero out struct */
- HDmemset(io_info, 0, sizeof(*io_info));
+ memset(io_info, 0, sizeof(*io_info));
/* Set up simple fields */
io_info->op_type = op_type;
@@ -1024,7 +1024,7 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer")
/* Initialize type info safely */
- HDmemset(type_info, 0, sizeof(*type_info));
+ memset(type_info, 0, sizeof(*type_info));
/* Get the memory & dataset datatypes */
if (NULL == (type_info->mem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE)))
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 4baa904..c52299f 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -117,7 +117,7 @@
*/
#define H5D_MPIO_INIT_CHUNK_UD_INFO(chunk_ud, index_info_ptr) \
do { \
- HDmemset(&chunk_ud, 0, sizeof(H5D_chunk_ud_t)); \
+ memset(&chunk_ud, 0, sizeof(H5D_chunk_ud_t)); \
chunk_ud.common.layout = (index_info_ptr)->layout; \
chunk_ud.common.storage = (index_info_ptr)->storage; \
} while (0)
@@ -541,7 +541,7 @@ H5D__mpio_debug_init(void)
assert(!H5D_mpio_debug_inited);
/* Clear the debug flag buffer */
- HDmemset(H5D_mpio_debug_flags_s, 0, sizeof(H5D_mpio_debug_flags_s));
+ memset(H5D_mpio_debug_flags_s, 0, sizeof(H5D_mpio_debug_flags_s));
/* Retrieve and parse the H5Dmpio debug string */
debug_str = HDgetenv("H5D_mpio_Debug");
@@ -3487,7 +3487,7 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
int new_chunk_owner;
/* Clear the mapping from rank value -> number of assigned chunks */
- HDmemset(num_chunks_assigned_map, 0, (size_t)mpi_size * sizeof(*num_chunks_assigned_map));
+ memset(num_chunks_assigned_map, 0, (size_t)mpi_size * sizeof(*num_chunks_assigned_map));
/* Sort collective chunk list according to chunk index */
qsort(coll_chunk_list, coll_chunk_list_num_entries, sizeof(H5D_chunk_redistribute_info_t),
@@ -3838,7 +3838,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
mod_data_p = msg_send_bufs[num_send_requests];
/* Store the chunk's index into the buffer */
- HDmemcpy(mod_data_p, &chunk_entry->index_info.chunk_idx, sizeof(hsize_t));
+ memcpy(mod_data_p, &chunk_entry->index_info.chunk_idx, sizeof(hsize_t));
mod_data_p += sizeof(hsize_t);
/* Serialize the chunk's file dataspace into the buffer */
@@ -4691,7 +4691,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
if (msg_ptr) {
/* Retrieve the chunk's index value */
- HDmemcpy(&chunk_idx, msg_ptr, sizeof(hsize_t));
+ memcpy(&chunk_idx, msg_ptr, sizeof(hsize_t));
msg_ptr += sizeof(hsize_t);
/* Find the chunk entry according to its chunk index */
@@ -5153,8 +5153,8 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
*/
for (size_t dbg_idx = 0; dbg_idx < chunk_list_num_entries; dbg_idx++) {
if (coll_entry->index_info.chunk_idx == chunk_list[dbg_idx].index_info.chunk_idx) {
- hbool_t coords_match = !HDmemcmp(scaled_coords, chunk_list[dbg_idx].chunk_info->scaled,
- di->dset->shared->ndims * sizeof(hsize_t));
+ hbool_t coords_match = !memcmp(scaled_coords, chunk_list[dbg_idx].chunk_info->scaled,
+ di->dset->shared->ndims * sizeof(hsize_t));
assert(coords_match && "Calculated scaled coordinates for chunk didn't match "
"chunk's actual scaled coordinates!");
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index f0cb3fd..3ade6ee 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -233,7 +233,7 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t ch
assert(H5_addr_defined(idx_info->storage->idx_addr));
/* Initialize generic chunk record */
- HDmemset(&chunk_rec, 0, sizeof(chunk_rec));
+ memset(&chunk_rec, 0, sizeof(chunk_rec));
chunk_rec.nbytes = idx_info->layout->size;
chunk_rec.filter_mask = 0;
diff --git a/src/H5Doh.c b/src/H5Doh.c
index d26c365..0d6f08c 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -378,7 +378,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
if (exists && H5D__efl_is_space_alloc(&layout.storage)) {
/* Start with clean EFL info */
- HDmemset(&efl, 0, sizeof(efl));
+ memset(&efl, 0, sizeof(efl));
/* Get External File List message from the object header */
if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_EFL_ID, &efl))
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index 4742053..ffea8da 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -112,7 +112,7 @@ H5D__scatter_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset
/* Set up temporary I/O info object */
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
- HDmemcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
+ memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
tmp_io_info.op_type = H5D_IO_OP_WRITE;
tmp_dset_info.buf.cvp = _buf;
tmp_io_info.dsets_info = &tmp_dset_info;
@@ -213,7 +213,7 @@ H5D__gather_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset_
/* Set up temporary I/O info object */
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
- HDmemcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
+ memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
tmp_io_info.op_type = H5D_IO_OP_READ;
tmp_dset_info.buf.vp = _buf;
tmp_io_info.dsets_info = &tmp_dset_info;
@@ -776,7 +776,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
/* Create block memory space */
if (NULL ==
(tmp_mem_spaces[i] = H5S_create_simple(1, &io_info->sel_pieces[i]->piece_points, NULL))) {
- HDmemset(&tmp_mem_spaces[i], 0, (io_info->pieces_added - i) * sizeof(tmp_mem_spaces[0]));
+ memset(&tmp_mem_spaces[i], 0, (io_info->pieces_added - i) * sizeof(tmp_mem_spaces[0]));
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create simple memory dataspace")
}
@@ -1369,7 +1369,7 @@ H5D__compound_opt_read(size_t nelmts, H5S_sel_iter_t *iter, const H5D_type_info_
/* Copy the data into the right place. */
for (i = 0; i < curr_nelmts; i++) {
- HDmemmove(xubuf, xdbuf, copy_size);
+ memmove(xubuf, xdbuf, copy_size);
/* Update pointers */
xdbuf += src_stride;
@@ -1442,7 +1442,7 @@ H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info, uint8_t
xsbuf = tconv_buf;
xdbuf = tconv_buf;
for (i = 0; i < nelmts; i++) {
- HDmemmove(xdbuf, xsbuf, dst_stride);
+ memmove(xdbuf, xsbuf, dst_stride);
/* Update pointers */
xsbuf += src_stride;
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index a4caebc..12c776d 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -298,7 +298,7 @@ H5D__single_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
assert(H5_addr_defined(idx_info->storage->idx_addr));
/* Initialize generic chunk record */
- HDmemset(&chunk_rec, 0, sizeof(chunk_rec));
+ memset(&chunk_rec, 0, sizeof(chunk_rec));
chunk_rec.chunk_addr = idx_info->storage->idx_addr;
if (idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 3711bcd..ad7e7e2 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -735,7 +735,7 @@ H5D__virtual_reset_layout(H5O_layout_t *layout)
virt->list = H5MM_xfree(virt->list);
virt->list_nalloc = (size_t)0;
virt->list_nused = (size_t)0;
- (void)HDmemset(virt->min_dims, 0, sizeof(virt->min_dims));
+ (void)memset(virt->min_dims, 0, sizeof(virt->min_dims));
/* Close access property lists */
if (virt->source_fapl >= 0) {
@@ -1548,9 +1548,9 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
storage->list[i].sub_dset = tmp_sub_dset;
/* Clear new space in sub_dset */
- (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
- storage->list[i].sub_dset_nalloc *
- sizeof(H5O_storage_virtual_srcdset_t));
+ (void)memset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
+ storage->list[i].sub_dset_nalloc *
+ sizeof(H5O_storage_virtual_srcdset_t));
/* Update sub_dset_nalloc */
storage->list[i].sub_dset_nalloc *= 2;
@@ -2016,9 +2016,9 @@ H5D__virtual_init_all(const H5D_t *dset)
storage->list[i].sub_dset = tmp_sub_dset;
/* Clear new space in sub_dset */
- (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
- (sub_dset_max - storage->list[i].sub_dset_nalloc) *
- sizeof(H5O_storage_virtual_srcdset_t));
+ (void)memset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
+ (sub_dset_max - storage->list[i].sub_dset_nalloc) *
+ sizeof(H5O_storage_virtual_srcdset_t));
/* Update sub_dset_nalloc */
storage->list[i].sub_dset_nalloc = sub_dset_max;
@@ -2457,7 +2457,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
/* Clip virtual selection to real virtual extent */
- (void)HDmemset(start, 0, sizeof(start));
+ (void)memset(start, 0, sizeof(start));
if (H5S_select_hyperslab(storage->list[i].sub_dset[j].clipped_virtual_select,
H5S_SELECT_AND, start, NULL, tmp_dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to clip hyperslab")
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 485f3c7..bcbfd37 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -303,7 +303,7 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
hdr->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header signature")
image += H5_SIZEOF_MAGIC;
@@ -611,7 +611,7 @@ H5EA__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
assert(image_len);
/* Set up fake index block for computing size on disk */
- HDmemset(&iblock, 0, sizeof(iblock));
+ memset(&iblock, 0, sizeof(iblock));
iblock.hdr = (H5EA_hdr_t *)hdr;
iblock.nsblks = H5EA_SBLK_FIRST_IDX(hdr->cparam.sup_blk_min_data_ptrs);
iblock.ndblk_addrs = 2 * ((size_t)hdr->cparam.sup_blk_min_data_ptrs - 1);
@@ -692,7 +692,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
iblock->addr = hdr->idx_blk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array index block signature")
image += H5_SIZEOF_MAGIC;
@@ -996,7 +996,7 @@ H5EA__cache_sblock_get_initial_load_size(void *_udata, size_t *image_len)
/* Set up fake super block for computing size on disk */
/* (Note: extracted from H5EA__sblock_alloc) */
- HDmemset(&sblock, 0, sizeof(sblock));
+ memset(&sblock, 0, sizeof(sblock));
sblock.hdr = udata->hdr;
sblock.ndblks = udata->hdr->sblk_info[udata->sblk_idx].ndblks;
sblock.dblk_nelmts = udata->hdr->sblk_info[udata->sblk_idx].dblk_nelmts;
@@ -1095,7 +1095,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
sblock->addr = udata->sblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array super block signature")
image += H5_SIZEOF_MAGIC;
@@ -1400,7 +1400,7 @@ H5EA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
/* Set up fake data block for computing size on disk */
/* (Note: extracted from H5EA__dblock_alloc) */
- HDmemset(&dblock, 0, sizeof(dblock));
+ memset(&dblock, 0, sizeof(dblock));
/* need to set:
*
@@ -1504,7 +1504,7 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
dblock->addr = udata->dblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array data block signature")
image += H5_SIZEOF_MAGIC;
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index b591ad5..41ff397 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -255,8 +255,8 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts)
"memory allocation failed for data block data element buffer factory array")
/* Zero out new elements allocated */
- HDmemset(new_fac + hdr->elmt_fac.nalloc, 0,
- (new_nalloc - hdr->elmt_fac.nalloc) * sizeof(H5FL_fac_head_ptr_t));
+ memset(new_fac + hdr->elmt_fac.nalloc, 0,
+ (new_nalloc - hdr->elmt_fac.nalloc) * sizeof(H5FL_fac_head_ptr_t));
/* Update information about element factories in header */
hdr->elmt_fac.nalloc = new_nalloc;
diff --git a/src/H5Eint.c b/src/H5Eint.c
index a739e98..b2d731e 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -414,7 +414,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
eprint.stream = stream;
/* Reset the original error class information */
- HDmemset(&eprint.cls, 0, sizeof(H5E_cls_t));
+ memset(&eprint.cls, 0, sizeof(H5E_cls_t));
/* Walk the error stack */
if (bk_compatible) {
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index 0b1aeba..490a296 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -248,7 +248,7 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
hdr->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array header signature")
image += H5_SIZEOF_MAGIC;
@@ -537,7 +537,7 @@ H5FA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
/* Set up fake data block for computing size on disk */
/* (Note: extracted from H5FA__dblock_alloc) */
- HDmemset(&dblock, 0, sizeof(dblock));
+ memset(&dblock, 0, sizeof(dblock));
/* Set up fake data block for computing size on disk
*
@@ -632,7 +632,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
dblock->addr = udata->dblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array data block signature")
image += H5_SIZEOF_MAGIC;
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index be4de62..0e07350 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -533,7 +533,7 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
old_fa = H5FD__core_get_default_config();
/* Set VFD info values */
- HDmemset(&fa, 0, sizeof(H5FD_core_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_core_fapl_t));
fa.increment = old_fa->increment;
fa.backing_store = old_fa->backing_store;
fa.write_tracking = is_enabled;
@@ -611,7 +611,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
/* Set VFD info values */
- HDmemset(&fa, 0, sizeof(H5FD_core_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_core_fapl_t));
fa.increment = increment;
fa.backing_store = backing_store;
fa.write_tracking = H5FD_CORE_WRITE_TRACKING_FLAG;
@@ -752,7 +752,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
/* If the file image exists and this is an open, make sure the file doesn't exist */
assert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
- HDmemset(&sb, 0, sizeof(sb));
+ memset(&sb, 0, sizeof(sb));
if ((file_image_info.buffer != NULL) && !(H5F_ACC_CREAT & flags)) {
if (HDopen(name, o_flags, H5_POSIX_CREATE_MODE_RW) >= 0)
HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file already exists")
@@ -1000,7 +1000,7 @@ H5FD__core_close(H5FD_t *_file)
else
H5MM_xfree(file->mem);
} /* end if */
- HDmemset(file, 0, sizeof(H5FD_core_t));
+ memset(file, 0, sizeof(H5FD_core_t));
H5MM_xfree(file);
done:
@@ -1059,9 +1059,9 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -1312,7 +1312,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
/* Read zeros for the part which is after the EOF markers */
if (size > 0)
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1374,7 +1374,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
"unable to allocate memory block of %llu bytes", (unsigned long long)new_eof)
} /* end else */
- HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
+ memset(x + file->eof, 0, (size_t)(new_eof - file->eof));
file->mem = x;
file->eof = new_eof;
@@ -1532,7 +1532,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
} /* end else */
if (file->eof < new_eof)
- HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
+ memset(x + file->eof, 0, (size_t)(new_eof - file->eof));
file->mem = x;
/* Update backing store, if using it and if closing */
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 771d31a..cdb0c5d 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -336,7 +336,7 @@ H5FD__direct_populate_config(size_t boundary, size_t block_size, size_t cbuf_siz
assert(fa_out);
- HDmemset(fa_out, 0, sizeof(H5FD_direct_fapl_t));
+ memset(fa_out, 0, sizeof(H5FD_direct_fapl_t));
if (boundary != 0)
fa_out->mboundary = boundary;
@@ -655,9 +655,9 @@ H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -873,7 +873,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
if (0 == nbytes) {
/* end of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
}
assert(nbytes >= 0);
@@ -915,7 +915,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
* system calls and partial results like sec2 driver does because the
* data may no longer be aligned. It's especially true when the data in
* file is smaller than ALLOC_SIZE. */
- HDmemset(copy_buf, 0, alloc_size);
+ memset(copy_buf, 0, alloc_size);
/* Calculate how much data we have to read in this iteration
* (including unused parts of blocks) */
@@ -1099,7 +1099,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
* both ends are misaligned, otherwise only read the block on the
* misaligned end.
*/
- HDmemset(copy_buf, 0, _fbsize);
+ memset(copy_buf, 0, _fbsize);
if (copy_offset > 0) {
if ((write_addr + write_size) > (addr + size)) {
diff --git a/src/H5FDint.c b/src/H5FDint.c
index c419cc0..892feac 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -178,7 +178,7 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to set EOA value for file signature")
if (H5FD_read(file, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to read file signature")
- if (!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
+ if (!memcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
break;
}
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 5523592..7ef21e1 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -304,7 +304,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si
/* Do this first, so that we don't try to free a wild pointer if
* H5P_object_verify() fails.
*/
- HDmemset(&fa, 0, sizeof(H5FD_log_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_log_fapl_t));
/* Check arguments */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
@@ -830,9 +830,9 @@ H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -916,7 +916,7 @@ H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hs
if (file->fa.flags & H5FD_LOG_FLAVOR) {
assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], (int)type, (size_t)size);
+ memset(&file->flavor[addr], (int)type, (size_t)size);
}
if (file->fa.flags & H5FD_LOG_ALLOC)
@@ -952,7 +952,7 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
if (file->fa.flags & H5FD_LOG_FLAVOR) {
assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
+ memset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
}
/* Log the file memory freed */
@@ -1013,7 +1013,7 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
if (file->fa.flags & H5FD_LOG_FLAVOR) {
assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[file->eoa], (int)type, (size_t)size);
+ memset(&file->flavor[file->eoa], (int)type, (size_t)size);
}
/* Log the extension like an allocation */
@@ -1031,7 +1031,7 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
if (file->fa.flags & H5FD_LOG_FLAVOR) {
assert((addr + size) < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
+ memset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
}
/* Log the shrink like a free */
@@ -1246,7 +1246,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
if (0 == bytes_read) {
/* End of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
}
@@ -1494,7 +1494,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
* algorithm */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
if ((H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT) {
- HDmemset(&file->flavor[orig_addr], (int)type, orig_size);
+ memset(&file->flavor[orig_addr], (int)type, orig_size);
fprintf(file->logfp, " (fresh)");
}
}
diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c
index 1be6442..68f663e 100644
--- a/src/H5FDmirror.c
+++ b/src/H5FDmirror.c
@@ -818,7 +818,7 @@ H5FD_mirror_xmit_encode_open(unsigned char *dest, const H5FD_mirror_xmit_open_t
assert(dest && x);
/* clear entire structure, but especially its filepath string area */
- HDmemset(dest, 0, H5FD_MIRROR_XMIT_OPEN_SIZE);
+ memset(dest, 0, H5FD_MIRROR_XMIT_OPEN_SIZE);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->flags);
@@ -855,7 +855,7 @@ H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirror_xmit_reply_
assert(dest && x);
/* clear entire structure, but especially its message string area */
- HDmemset(dest, 0, H5FD_MIRROR_XMIT_REPLY_SIZE);
+ memset(dest, 0, H5FD_MIRROR_XMIT_REPLY_SIZE);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->status);
@@ -1385,7 +1385,7 @@ H5FD__mirror_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
target_addr.sin_family = AF_INET;
target_addr.sin_port = htons((uint16_t)fa.handshake_port);
target_addr.sin_addr.s_addr = inet_addr(fa.remote_ip);
- HDmemset(target_addr.sin_zero, '\0', sizeof target_addr.sin_zero);
+ memset(target_addr.sin_zero, '\0', sizeof target_addr.sin_zero);
addr_size = sizeof(target_addr);
if (connect(live_socket, (struct sockaddr *)&target_addr, addr_size) < 0)
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 9f24c95..d2c0416 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -273,7 +273,7 @@ H5FD_mpio_wait_for_left_neighbor(H5FD_t *_file)
assert(H5FD_MPIO == file->pub.driver_id);
/* Portably initialize MPI status variable */
- HDmemset(&rcvstat, 0, sizeof(MPI_Status));
+ memset(&rcvstat, 0, sizeof(MPI_Status));
/* p0 has no left neighbor; all other procs wait for msg */
if (file->mpi_rank != 0) {
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index be74a17..47f6ae5 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -285,7 +285,7 @@ H5FD_mpio_init(void)
#ifdef H5FDmpio_DEBUG
/* Clear the flag buffer */
- HDmemset(H5FD_mpio_debug_flags_s, 0, sizeof(H5FD_mpio_debug_flags_s));
+ memset(H5FD_mpio_debug_flags_s, 0, sizeof(H5FD_mpio_debug_flags_s));
/* Retrieve MPI-IO debugging environment variable */
s = HDgetenv("H5FD_mpio_Debug");
@@ -1236,7 +1236,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
assert(buf);
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
/* some numeric conversions */
if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off /*out*/) < 0)
@@ -1430,7 +1430,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
* This gives us zeroes beyond end of physical MPI file.
*/
if ((n = (io_size - bytes_read)) > 0)
- HDmemset((char *)buf + bytes_read, 0, (size_t)n);
+ memset((char *)buf + bytes_read, 0, (size_t)n);
done:
if (derived_type)
@@ -1506,7 +1506,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
assert(!H5CX_get_mpi_file_flushing());
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
/* some numeric conversions */
if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off) < 0)
@@ -2132,7 +2132,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
}
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(mpi_stat));
+ memset(&mpi_stat, 0, sizeof(mpi_stat));
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
@@ -2264,7 +2264,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
#endif
assert(bytes_read >= 0);
- HDmemset((char *)s_bufs[i] + bytes_read, 0, (size_t)io_size);
+ memset((char *)s_bufs[i] + bytes_read, 0, (size_t)io_size);
n -= io_size;
i--;
@@ -2331,7 +2331,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Check if we actually need to do I/O */
if (addrs[i] < max_addr) {
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(mpi_stat));
+ memset(&mpi_stat, 0, sizeof(mpi_stat));
/* Issue read */
if (MPI_SUCCESS !=
@@ -2364,13 +2364,13 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
* addresses.
*/
if ((n = (io_size - bytes_read)) > 0) {
- HDmemset((char *)bufs[i] + bytes_read, 0, (size_t)n);
+ memset((char *)bufs[i] + bytes_read, 0, (size_t)n);
max_addr = addrs[i] + (haddr_t)bytes_read;
}
}
else {
/* Read is past the max address, fill in zeroes */
- HDmemset((char *)bufs[i], 0, size);
+ memset((char *)bufs[i], 0, size);
}
}
}
@@ -2538,7 +2538,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
}
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
diff --git a/src/H5FDonion.c b/src/H5FDonion.c
index ac46707..aec018d 100644
--- a/src/H5FDonion.c
+++ b/src/H5FDonion.c
@@ -295,7 +295,7 @@ H5Pget_fapl_onion(hid_t fapl_id, H5FD_onion_fapl_info_t *fa_out)
if (NULL == (info_ptr = (const H5FD_onion_fapl_info_t *)H5P_peek_driver_info(plist)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad VFL driver info")
- HDmemcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t));
+ memcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t));
done:
FUNC_LEAVE_API(ret_value)
@@ -514,7 +514,7 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file)
if (NULL == (new_list = H5MM_calloc((history->n_revisions + 1) * sizeof(H5FD_onion_record_loc_t))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to resize record pointer list")
- HDmemcpy(new_list, history->record_locs, sizeof(H5FD_onion_record_loc_t) * history->n_revisions);
+ memcpy(new_list, history->record_locs, sizeof(H5FD_onion_record_loc_t) * history->n_revisions);
H5MM_xfree(history->record_locs);
history->record_locs = new_list;
new_list = NULL;
@@ -979,7 +979,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
/* Initialize file structure fields */
- HDmemcpy(&(file->fa), fa, sizeof(H5FD_onion_fapl_info_t));
+ memcpy(&(file->fa), fa, sizeof(H5FD_onion_fapl_info_t));
file->header.version = H5FD_ONION_HEADER_VERSION_CURR;
file->header.page_size = file->fa.page_size; /* guarded on FAPL-set */
@@ -1522,7 +1522,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
if (H5FD_read(file->onion_file, H5FD_MEM_DRAW, entry_out->phys_addr, page_size, page_buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get working file data")
/* Overlay delta from input buffer onto page buffer. */
- HDmemcpy(page_buf + page_gap_head, buf, page_n_used);
+ memcpy(page_buf + page_gap_head, buf, page_n_used);
write_buf = page_buf;
} /* end if partial page */
@@ -1570,7 +1570,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
/* Copy input buffer to temporary page buffer */
assert((page_size - page_gap_head) >= page_n_used);
- HDmemcpy(page_buf + page_gap_head, buf, page_n_used);
+ memcpy(page_buf + page_gap_head, buf, page_n_used);
write_buf = page_buf;
} /* end if data range does not span entire page */
diff --git a/src/H5FDonion_header.c b/src/H5FDonion_header.c
index 6feded4..b9ab88a 100644
--- a/src/H5FDonion_header.c
+++ b/src/H5FDonion_header.c
@@ -142,34 +142,34 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
ptr = buf + 5;
ui32 = 0;
- HDmemcpy(&ui32, ptr, 3);
+ memcpy(&ui32, ptr, 3);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->flags);
ptr += 3;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->page_size);
ptr += 4;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->origin_eof);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->history_addr);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->history_size);
ptr += 8;
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->checksum);
ptr += 4;
@@ -214,9 +214,9 @@ H5FD__onion_header_encode(H5FD_onion_header_t *header, unsigned char *buf, uint3
assert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
assert(0 == (header->flags & 0xFF000000)); /* max three bits long */
- HDmemcpy(ptr, H5FD_ONION_HEADER_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_HEADER_SIGNATURE, 4);
ptr += 4;
- HDmemcpy(ptr, (unsigned char *)&header->version, 1);
+ memcpy(ptr, (unsigned char *)&header->version, 1);
ptr += 1;
UINT32ENCODE(ptr, header->flags);
ptr -= 1; /* truncate to three bytes */
diff --git a/src/H5FDonion_history.c b/src/H5FDonion_history.c
index 33a16ab..06a3e3b 100644
--- a/src/H5FDonion_history.c
+++ b/src/H5FDonion_history.c
@@ -180,7 +180,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
ptr = buf + 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, n_revisions);
ptr += 8;
@@ -207,19 +207,19 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
uint64_t record_size;
uint64_t phys_addr;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, phys_addr);
H5_CHECKED_ASSIGN(rloc->phys_addr, haddr_t, phys_addr, uint64_t);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record_size);
H5_CHECKED_ASSIGN(rloc->record_size, hsize_t, record_size, uint64_t);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, rloc->checksum);
ptr += 4;
@@ -228,7 +228,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, history->checksum);
ptr += 4;
@@ -275,7 +275,7 @@ H5FD__onion_history_encode(H5FD_onion_history_t *history, unsigned char *buf, ui
assert(buf != NULL);
assert(checksum != NULL);
- HDmemcpy(ptr, H5FD_ONION_HISTORY_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_HISTORY_SIGNATURE, 4);
ptr += 4;
UINT32ENCODE(ptr, vers_u32);
UINT64ENCODE(ptr, history->n_revisions);
diff --git a/src/H5FDonion_index.c b/src/H5FDonion_index.c
index 6adf38c..69d1929 100644
--- a/src/H5FDonion_index.c
+++ b/src/H5FDonion_index.c
@@ -483,7 +483,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
if (entry->phys_addr != node->entry_data.phys_addr) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "physical address mismatch");
}
- HDmemcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
append_dest = NULL; /* Node updated, do not append */
break;
}
@@ -496,7 +496,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new ash chain node")
node->version = H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR;
node->next = NULL;
- HDmemcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
*append_dest = node;
rix->n_entries++;
}
@@ -612,25 +612,25 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
ptr = buf + 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->revision_num);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->parent_revision_num);
ptr += 8;
- HDmemcpy(record->time_of_creation, ptr, 16);
+ memcpy(record->time_of_creation, ptr, 16);
ptr += 16;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->logical_eof);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, page_size);
ptr += 4;
@@ -645,12 +645,12 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
record->archival_index.page_size_log2++)
;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, n_entries);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, comment_size);
ptr += 4;
@@ -671,7 +671,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
for (size_t i = 0; i < n_entries; i++) {
entry = &record->archival_index.list[i];
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, entry->logical_page);
ptr += 8;
@@ -682,12 +682,12 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
entry->logical_page = entry->logical_page >> record->archival_index.page_size_log2;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, entry->phys_addr);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, sum);
ptr += 4;
@@ -706,13 +706,13 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
else {
if (record->comment == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "no comment pointer")
- HDmemcpy(record->comment, ptr, comment_size);
+ memcpy(record->comment, ptr, comment_size);
}
ptr += comment_size;
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, record->checksum);
ptr += 4;
@@ -765,12 +765,12 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
page_size = (uint32_t)(1 << record->archival_index.page_size_log2);
- HDmemcpy(ptr, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4);
ptr += 4;
UINT32ENCODE(ptr, vers_u32);
UINT64ENCODE(ptr, record->revision_num);
UINT64ENCODE(ptr, record->parent_revision_num);
- HDmemcpy(ptr, record->time_of_creation, 16);
+ memcpy(ptr, record->time_of_creation, 16);
ptr += 16;
UINT64ENCODE(ptr, record->logical_eof);
UINT32ENCODE(ptr, page_size);
@@ -798,7 +798,7 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
if (record->comment_size > 0) {
assert(record->comment != NULL && *record->comment != '\0');
- HDmemcpy(ptr, record->comment, record->comment_size);
+ memcpy(ptr, record->comment, record->comment_size);
ptr += record->comment_size;
}
@@ -876,7 +876,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
const H5FD_onion_revision_index_hash_chain_node_t *node = NULL;
for (node = rix->_hash_table[i]; node != NULL; node = node->next) {
- HDmemcpy(&new_aix.list[new_aix.n_entries], &node->entry_data, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&new_aix.list[new_aix.n_entries], &node->entry_data, sizeof(H5FD_onion_index_entry_t));
new_aix.n_entries++;
}
}
@@ -901,7 +901,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
/* Add only if page not already added from revision index */
if (H5FD__onion_archival_index_find(&new_aix, aix->list[i].logical_page, &entry) == 0) {
- HDmemcpy(&kept_list[n_kept], &aix->list[i], sizeof(H5FD_onion_index_entry_t));
+ memcpy(&kept_list[n_kept], &aix->list[i], sizeof(H5FD_onion_index_entry_t));
n_kept++;
}
}
@@ -914,12 +914,12 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate exact-size archival index list")
/* Copy (new) revision list entries to replacement list */
- HDmemcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);
+ memcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);
aix->n_entries = new_aix.n_entries;
/* Copy (old) kept archival list entries to replacement list */
if (n_kept > 0) {
- HDmemcpy(&aix->list[aix->n_entries], kept_list, sizeof(H5FD_onion_index_entry_t) * n_kept);
+ memcpy(&aix->list[aix->n_entries], kept_list, sizeof(H5FD_onion_index_entry_t) * n_kept);
aix->n_entries += n_kept;
}
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 7d49adb..cfc4f7e 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -477,9 +477,9 @@ H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
if (f1->inode < f2->inode)
@@ -710,7 +710,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if (0 == bytes_read) {
/* end of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
} /* end if */
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index c33f083..159a161 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -406,7 +406,7 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
assert(fapl_out);
- HDmemset(fapl_out, 0, sizeof(H5FD_splitter_fapl_t));
+ memset(fapl_out, 0, sizeof(H5FD_splitter_fapl_t));
if (!vfd_config) {
vfd_config = H5MM_calloc(sizeof(H5FD_splitter_vfd_config_t));
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c
index 7baa334..81ad0e7 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 */
- HDmemcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t));
+ memcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t));
}
done:
@@ -424,7 +424,7 @@ H5FD__ioc_get_default_config(H5FD_ioc_config_t *config_out)
assert(config_out);
- HDmemset(config_out, 0, sizeof(*config_out));
+ memset(config_out, 0, sizeof(*config_out));
config_out->magic = H5FD_IOC_FAPL_MAGIC;
config_out->version = H5FD_IOC_CURR_FAPL_VERSION;
@@ -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");
- HDmemcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t));
+ 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 */
- HDmemcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t));
+ 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)
diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c
index 3ac7a07..f4da503 100644
--- a/src/H5FDsubfiling/H5FDioc_threads.c
+++ b/src/H5FDsubfiling/H5FDioc_threads.c
@@ -389,7 +389,7 @@ ioc_main(ioc_data_t *ioc_data)
* Zero out work request, since the received message should
* be smaller than sizeof(sf_work_request_t)
*/
- HDmemset(&wk_req, 0, sizeof(sf_work_request_t));
+ memset(&wk_req, 0, sizeof(sf_work_request_t));
if (MPI_SUCCESS != (mpi_code = MPI_Recv(&wk_req, count, MPI_BYTE, source, tag,
context->sf_msg_comm, MPI_STATUS_IGNORE)))
@@ -1086,7 +1086,7 @@ ioc_file_read_data(int fd, int64_t file_offset, void *data_buffer, int64_t data_
assert(bytes_remaining > 0);
/* end of file but not end of format address space */
- HDmemset(this_buffer, 0, (size_t)bytes_remaining);
+ memset(this_buffer, 0, (size_t)bytes_remaining);
break;
}
else {
@@ -1304,7 +1304,7 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
assert(entry_ptr);
assert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
- HDmemcpy((void *)(&(entry_ptr->wk_req)), (const void *)wk_req_ptr, sizeof(sf_work_request_t));
+ memcpy((void *)(&(entry_ptr->wk_req)), (const void *)wk_req_ptr, sizeof(sf_work_request_t));
/* must obtain io_queue mutex before appending */
hg_thread_mutex_lock(&ioc_data->io_queue.q_mutex);
diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c
index 9f2f4c8..6a04f68 100644
--- a/src/H5FDsubfiling/H5FDsubfiling.c
+++ b/src/H5FDsubfiling/H5FDsubfiling.c
@@ -553,7 +553,7 @@ H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out)
}
else {
/* Copy the subfiling fapl data out */
- HDmemcpy(config_out, config_ptr, sizeof(H5FD_subfiling_config_t));
+ memcpy(config_out, config_ptr, sizeof(H5FD_subfiling_config_t));
/* Copy the driver info value */
if (H5FD__copy_plist(config_ptr->ioc_fapl_id, &(config_out->ioc_fapl_id)) < 0)
@@ -574,7 +574,7 @@ H5FD__subfiling_get_default_config(hid_t fapl_id, H5FD_subfiling_config_t *confi
assert(config_out);
- HDmemset(config_out, 0, sizeof(*config_out));
+ memset(config_out, 0, sizeof(*config_out));
config_out->magic = H5FD_SUBFILING_FAPL_MAGIC;
config_out->version = H5FD_SUBFILING_CURR_FAPL_VERSION;
@@ -811,7 +811,7 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
/* Encode config file prefix string */
if (sf_context->config_file_prefix) {
- HDmemcpy(p, sf_context->config_file_prefix, prefix_len);
+ memcpy(p, sf_context->config_file_prefix, prefix_len);
p += prefix_len;
}
@@ -819,14 +819,14 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
if (file->sf_file) {
char ioc_name[9];
- HDmemset(ioc_name, 0, sizeof(ioc_name));
+ memset(ioc_name, 0, sizeof(ioc_name));
if (H5FD_sb_encode(file->sf_file, ioc_name, p + 9) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL,
"unable to encode IOC VFD's superblock information");
/* Copy the IOC VFD's name into our buffer */
- HDmemcpy(p, ioc_name, 9);
+ memcpy(p, ioc_name, 9);
}
done:
@@ -893,7 +893,7 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate space for config file prefix string");
- HDmemcpy(sf_context->config_file_prefix, p, tmpu64);
+ memcpy(sf_context->config_file_prefix, p, tmpu64);
/* Just in case.. */
sf_context->config_file_prefix[tmpu64 - 1] = '\0';
@@ -905,7 +905,7 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
if (file->sf_file) {
char ioc_name[9];
- HDmemcpy(ioc_name, p, 9);
+ memcpy(ioc_name, p, 9);
p += 9;
if (H5FD_sb_load(file->sf_file, ioc_name, p) < 0)
@@ -960,7 +960,7 @@ H5FD__subfiling_fapl_get(H5FD_t *_file)
}
/* Copy the fields of the structure */
- HDmemcpy(fa, &(file->fa), sizeof(H5FD_subfiling_config_t));
+ memcpy(fa, &(file->fa), sizeof(H5FD_subfiling_config_t));
/* Copy the driver info value */
if (H5FD__copy_plist(file->fa.ioc_fapl_id, &(fa->ioc_fapl_id)) < 0)
@@ -1036,7 +1036,7 @@ H5FD__subfiling_fapl_copy(const void *_old_fa)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
}
- HDmemcpy(new_fa, old_fa, sizeof(H5FD_subfiling_config_t));
+ memcpy(new_fa, old_fa, sizeof(H5FD_subfiling_config_t));
if (H5FD__copy_plist(old_fa->ioc_fapl_id, &(new_fa->ioc_fapl_id)) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy the IOC FAPL");
@@ -1169,7 +1169,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
config_ptr = &default_config;
}
- HDmemcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_subfiling_config_t));
+ memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_subfiling_config_t));
if (H5FD__copy_plist(config_ptr->ioc_fapl_id, &(file_ptr->fa.ioc_fapl_id)) < 0) {
file_ptr->fa.ioc_fapl_id = H5I_INVALID_HID;
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy FAPL");
@@ -2844,9 +2844,9 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
_target_file_offset = target_file_offset + output_offset;
_io_block_len = io_block_len + output_offset;
- HDmemset(_mem_buf_offset, 0, (max_iovec_len * sizeof(*_mem_buf_offset)));
- HDmemset(_target_file_offset, 0, (max_iovec_len * sizeof(*_target_file_offset)));
- HDmemset(_io_block_len, 0, (max_iovec_len * sizeof(*_io_block_len)));
+ memset(_mem_buf_offset, 0, (max_iovec_len * sizeof(*_mem_buf_offset)));
+ memset(_target_file_offset, 0, (max_iovec_len * sizeof(*_target_file_offset)));
+ memset(_io_block_len, 0, (max_iovec_len * sizeof(*_io_block_len)));
if (total_bytes == data_size) {
*n_subfiles_used = i;
diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c
index 8ddb3a3..379a49d 100644
--- a/src/H5FDsubfiling/H5subfiling_common.c
+++ b/src/H5FDsubfiling/H5subfiling_common.c
@@ -179,8 +179,8 @@ H5_get_subfiling_object(int64_t object_id)
sf_context_cache_size = new_size;
/* Clear newly-allocated entries */
- HDmemset(&sf_context_cache[old_num_entries], 0,
- (sf_context_cache_size - old_num_entries) * sizeof(*sf_context_cache));
+ memset(&sf_context_cache[old_num_entries], 0,
+ (sf_context_cache_size - old_num_entries) * sizeof(*sf_context_cache));
/*
* If we had to make more space, the given object index
@@ -236,8 +236,8 @@ H5_get_subfiling_object(int64_t object_id)
sf_topology_cache_size = new_size;
/* Clear newly-allocated entries */
- HDmemset(&sf_topology_cache[old_num_entries], 0,
- (sf_topology_cache_size - old_num_entries) * sizeof(*sf_topology_cache));
+ memset(&sf_topology_cache[old_num_entries], 0,
+ (sf_topology_cache_size - old_num_entries) * sizeof(*sf_topology_cache));
/*
* If we had to make more space, the given object index
diff --git a/src/H5FL.c b/src/H5FL.c
index 39b5343..1e1532e 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -337,7 +337,7 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
#endif /* H5FL_TRACK */
#ifdef H5FL_DEBUG
- HDmemset(obj, 255, head->size);
+ memset(obj, 255, head->size);
#endif /* H5FL_DEBUG */
/* Make certain that the free list is initialized */
@@ -470,7 +470,7 @@ H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
/* Clear to zeros */
/* (Accommodate tracking information, if present) */
- HDmemset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
+ memset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -917,7 +917,7 @@ H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear the block to zeros */
- HDmemset(ret_value, 0, size);
+ memset(ret_value, 0, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -957,7 +957,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
unsigned char *block_ptr = ((unsigned char *)block) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Free tracking information about the allocation location */
H5CS_close_stack(trk.stack);
@@ -979,7 +979,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
trk.next->prev = trk.prev;
} /* end else */
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif /* H5FL_TRACK */
@@ -993,7 +993,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
free_size = temp->size;
#ifdef H5FL_DEBUG
- HDmemset(temp, 255, free_size + sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE);
+ memset(temp, 255, free_size + sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE);
#endif /* H5FL_DEBUG */
/* Check if there is a free list for native blocks of this size */
@@ -1079,7 +1079,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
unsigned char *block_ptr = ((unsigned char *)block) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Release previous tracking information */
H5CS_close_stack(trk.stack);
@@ -1099,7 +1099,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
trk.func = call_func;
trk.line = call_line;
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif /* H5FL_TRACK */
ret_value = block;
@@ -1380,7 +1380,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
unsigned char *block_ptr = ((unsigned char *)obj) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Free tracking information about the allocation location */
H5CS_close_stack(trk.stack);
@@ -1402,7 +1402,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
trk.next->prev = trk.prev;
} /* end else */
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif
@@ -1570,7 +1570,7 @@ H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear to zeros */
- HDmemset(ret_value, 0, head->list_arr[elem].size);
+ memset(ret_value, 0, head->list_arr[elem].size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1631,7 +1631,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
unsigned char *block_ptr = ((unsigned char *)obj) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Release previous tracking information */
H5CS_close_stack(trk.stack);
@@ -1651,7 +1651,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
trk.func = call_func;
trk.line = call_line;
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
#endif
ret_value = obj;
}
@@ -2047,7 +2047,7 @@ H5FL_fac_free(H5FL_fac_head_t *head, void *obj)
#endif /* H5FL_TRACK */
#ifdef H5FL_DEBUG
- HDmemset(obj, 255, head->size);
+ memset(obj, 255, head->size);
#endif /* H5FL_DEBUG */
/* Make certain that the free list is initialized */
@@ -2178,7 +2178,7 @@ H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
/* Clear to zeros */
/* (Accommodate tracking information, if present) */
- HDmemset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
+ memset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 09dc528..25443d5 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -237,7 +237,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
fspace->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature")
image += H5_SIZEOF_MAGIC;
@@ -946,7 +946,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
H5_CHECKED_ASSIGN(old_sect_size, size_t, fspace->sect_size, hsize_t);
/* Magic number */
- if (HDmemcmp(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature")
image += H5_SIZEOF_MAGIC;
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 1599269..4d4b1f9 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -147,7 +147,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si
accum->alloc_size = new_alloc_size;
/* Clear the memory */
- HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
+ memset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
} /* end if */
/* Read the part before the metadata accumulator */
@@ -156,7 +156,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si
H5_CHECKED_ASSIGN(amount_before, size_t, (accum->loc - addr), hsize_t);
/* Make room for the metadata to read in */
- HDmemmove(accum->buf + amount_before, accum->buf, accum->size);
+ memmove(accum->buf + amount_before, accum->buf, accum->size);
/* Adjust dirty region tracking info, if present */
if (accum->dirty)
@@ -360,7 +360,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
/* When appending, need to adjust location of accumulator */
if (H5F_ACCUM_APPEND == adjust) {
/* Move remnant of accumulator down */
- HDmemmove(accum->buf, (accum->buf + shrink_size), remnant_size);
+ memmove(accum->buf, (accum->buf + shrink_size), remnant_size);
/* Adjust accumulator's location */
accum->loc += shrink_size;
@@ -380,7 +380,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
accum->alloc_size = new_size;
/* Clear the memory */
- HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
+ memset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
} /* end if */
} /* end if */
@@ -434,7 +434,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
/* Move the existing metadata to the proper location */
- HDmemmove(accum->buf + size, accum->buf, accum->size);
+ memmove(accum->buf + size, accum->buf, accum->size);
/* Copy the new metadata at the front */
H5MM_memcpy(accum->buf, buf, size);
@@ -524,7 +524,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
H5_CHECKED_ASSIGN(old_offset, size_t, (addr + size) - accum->loc, hsize_t);
/* Move the existing metadata to the proper location */
- HDmemmove(accum->buf + size, accum->buf + old_offset, (accum->size - old_offset));
+ memmove(accum->buf + size, accum->buf + old_offset, (accum->size - old_offset));
/* Copy the new metadata at the front */
H5MM_memcpy(accum->buf, buf, size);
@@ -607,7 +607,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
accum->alloc_size = new_alloc_size;
/* Clear the memory */
- HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
+ memset(accum->buf + size, 0, (accum->alloc_size - size));
} /* end if */
/* Copy the new metadata to the buffer */
@@ -654,7 +654,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Clear the memory */
clear_size = MAX(accum->size, size);
- HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
+ memset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
} /* end if */
else {
/* Check if we should shrink the accumulator buffer */
@@ -704,7 +704,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
accum->alloc_size = new_size;
/* Clear the memory */
- HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
+ memset(accum->buf + size, 0, (accum->alloc_size - size));
} /* end if */
/* Update the metadata accumulator information */
@@ -771,7 +771,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Trim bottom of accumulator off */
accum->loc += overlap_size;
accum->size -= overlap_size;
- HDmemmove(accum->buf, accum->buf + overlap_size, accum->size);
+ memmove(accum->buf, accum->buf + overlap_size, accum->size);
} /* end if */
else { /* Access covers whole accumulator */
/* Reset accumulator, but don't flush */
@@ -881,7 +881,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
new_accum_size = accum->size - overlap_size;
/* Move the accumulator buffer information to eliminate the freed block */
- HDmemmove(accum->buf, accum->buf + overlap_size, new_accum_size);
+ memmove(accum->buf, accum->buf + overlap_size, new_accum_size);
/* Adjust the accumulator information */
accum->loc += overlap_size;
diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c
index 03cbdc6..f5892a3 100644
--- a/src/H5Fcwfs.c
+++ b/src/H5Fcwfs.c
@@ -113,13 +113,13 @@ H5F_cwfs_add(H5F_t *f, H5HG_heap_t *heap)
for (i = H5F_NCWFS - 1; i >= 0; --i)
if (H5HG_FREE_SIZE(f->shared->cwfs[i]) < H5HG_FREE_SIZE(heap)) {
- HDmemmove(f->shared->cwfs + 1, f->shared->cwfs, (size_t)i * sizeof(H5HG_heap_t *));
+ memmove(f->shared->cwfs + 1, f->shared->cwfs, (size_t)i * sizeof(H5HG_heap_t *));
f->shared->cwfs[0] = heap;
break;
} /* end if */
}
else {
- HDmemmove(f->shared->cwfs + 1, f->shared->cwfs, f->shared->ncwfs * sizeof(H5HG_heap_t *));
+ memmove(f->shared->cwfs + 1, f->shared->cwfs, f->shared->ncwfs * sizeof(H5HG_heap_t *));
f->shared->cwfs[0] = heap;
f->shared->ncwfs += 1;
} /* end else */
@@ -288,7 +288,7 @@ H5F_cwfs_remove_heap(H5F_shared_t *shared, H5HG_heap_t *heap)
for (u = 0; u < shared->ncwfs; u++) {
if (shared->cwfs[u] == heap) {
shared->ncwfs -= 1;
- HDmemmove(shared->cwfs + u, shared->cwfs + u + 1, (shared->ncwfs - u) * sizeof(H5HG_heap_t *));
+ memmove(shared->cwfs + u, shared->cwfs + u + 1, (shared->ncwfs - u) * sizeof(H5HG_heap_t *));
break;
} /* end if */
} /* end for */
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 49f4323..f3d7e2e 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -3211,7 +3211,7 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le
tmp_size = H5F_SUPER_STATUS_FLAGS_SIZE(file->shared->sblock->super_vers);
/* Clear "status_flags" */
- HDmemset((uint8_t *)buf_ptr + tmp, 0, tmp_size);
+ memset((uint8_t *)buf_ptr + tmp, 0, tmp_size);
} /* end if */
/* Set *image_len = to EOA */
@@ -3243,7 +3243,7 @@ H5F__get_info(H5F_t *f, H5F_info2_t *finfo)
assert(finfo);
/* Reset file info struct */
- HDmemset(finfo, 0, sizeof(*finfo));
+ memset(finfo, 0, sizeof(*finfo));
/* Get the size of the superblock and any superblock extensions */
if (H5F__super_size(f, &finfo->super.super_size, &finfo->super.super_ext_size) < 0)
@@ -3336,7 +3336,7 @@ H5F_set_retries(H5F_t *f)
assert(f);
/* Initialize the tracking for metadata read retries */
- HDmemset(f->shared->retries, 0, sizeof(f->shared->retries));
+ memset(f->shared->retries, 0, sizeof(f->shared->retries));
/* Initialize the # of bins for retries */
f->shared->retries_nbins = 0;
@@ -3524,7 +3524,7 @@ H5F_get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info)
info->nbins = file->shared->retries_nbins;
/* Initialize the array of "retries" */
- HDmemset(info->retries, 0, sizeof(info->retries));
+ memset(info->retries, 0, sizeof(info->retries));
/* Return if there are no bins -- no retries */
if (!info->nbins)
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index b17baea..ef2249f 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -65,8 +65,8 @@ H5F__close_mounts(H5F_t *f)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close child file")
/* Eliminate the mount point from the table */
- HDmemmove(f->shared->mtab.child + u, f->shared->mtab.child + u + 1,
- (f->shared->mtab.nmounts - u - 1) * sizeof(f->shared->mtab.child[0]));
+ memmove(f->shared->mtab.child + u, f->shared->mtab.child + u + 1,
+ (f->shared->mtab.nmounts - u - 1) * sizeof(f->shared->mtab.child[0]));
f->shared->mtab.nmounts--;
f->nmounts--;
}
@@ -195,8 +195,8 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN
}
/* Insert into table */
- HDmemmove(parent->shared->mtab.child + md + 1, parent->shared->mtab.child + md,
- (parent->shared->mtab.nmounts - md) * sizeof(parent->shared->mtab.child[0]));
+ memmove(parent->shared->mtab.child + md + 1, parent->shared->mtab.child + md,
+ (parent->shared->mtab.nmounts - md) * sizeof(parent->shared->mtab.child[0]));
parent->shared->mtab.nmounts++;
parent->nmounts++;
parent->shared->mtab.child[md].group = mount_point;
@@ -356,10 +356,10 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to replace name")
/* Eliminate the mount point from the table */
- HDmemmove(parent->shared->mtab.child + (unsigned)child_idx,
- (parent->shared->mtab.child + (unsigned)child_idx) + 1,
- ((parent->shared->mtab.nmounts - (unsigned)child_idx) - 1) *
- sizeof(parent->shared->mtab.child[0]));
+ memmove(parent->shared->mtab.child + (unsigned)child_idx,
+ (parent->shared->mtab.child + (unsigned)child_idx) + 1,
+ ((parent->shared->mtab.nmounts - (unsigned)child_idx) - 1) *
+ sizeof(parent->shared->mtab.child[0]));
parent->shared->mtab.nmounts -= 1;
parent->nmounts -= 1;
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 502f554..92157ae 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -1367,7 +1367,7 @@ H5F__super_init(H5F_t *f)
assert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
- HDmemset(dbuf, 0, sizeof(dbuf));
+ memset(dbuf, 0, sizeof(dbuf));
if (H5FD_sb_encode(f->shared->lf, info.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index a4a127d..705832a 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -164,7 +164,7 @@ H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_
/* Magic */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, image_end))
HGOTO_ERROR(H5E_SYM, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "bad symbol table node signature")
image += H5_SIZEOF_MAGIC;
@@ -268,7 +268,7 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, void *_thing
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize")
/* Clear rest of symbol table node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index beef534..7e96d16 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -260,7 +260,7 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/* Set fractal heap creation parameters */
/* XXX: Give some control of these to applications? */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5G_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5G_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5G_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -285,7 +285,7 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
assert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN);
/* Create the name index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5G_BT2_NAME;
bt2_cparam.node_size = (size_t)H5G_NAME_BT2_NODE_SIZE;
H5_CHECK_OVERFLOW(fheap_id_len, /* From: */ hsize_t, /* To: */ uint32_t);
@@ -303,7 +303,7 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/* Check if we should create a creation order index v2 B-tree */
if (linfo->index_corder) {
/* Create the creation order index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5G_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5G_CORDER_BT2_NODE_SIZE;
H5_CHECK_OVERFLOW(fheap_id_len, /* From: */ hsize_t, /* To: */ uint32_t);
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 274c460..a77525a 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -1075,7 +1075,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5
/* Reset stat buffer */
if (statbuf)
- HDmemset(statbuf, 0, sizeof(H5G_stat_t));
+ memset(statbuf, 0, sizeof(H5G_stat_t));
/* Set up user data for retrieving information */
udata.statbuf = statbuf;
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 1f76069..4710ff1 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -266,7 +266,7 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
/* fill with zero */
if (*pp < p_ret)
- HDmemset(*pp, 0, (size_t)(p_ret - *pp));
+ memset(*pp, 0, (size_t)(p_ret - *pp));
*pp = p_ret;
done:
@@ -336,7 +336,7 @@ H5G__ent_reset(H5G_entry_t *ent)
assert(ent);
/* Clear the symbol table entry to an empty state */
- HDmemset(ent, 0, sizeof(H5G_entry_t));
+ memset(ent, 0, sizeof(H5G_entry_t));
ent->header = HADDR_UNDEF;
FUNC_LEAVE_NOAPI_VOID
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 14a11ab..c5cb82b 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -251,7 +251,7 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t g
/* Set up group creation info */
gcrt_info.gcpl_id = gcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Set up object creation information */
ocrt_info.obj_type = H5O_TYPE_GROUP;
@@ -1098,7 +1098,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
herr_t ret_value = FAIL; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5Gname.c b/src/H5Gname.c
index dbca91f..fcb896f 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -503,7 +503,7 @@ H5G_name_reset(H5G_name_t *name)
assert(name);
/* Clear the group hier. name to an empty state */
- HDmemset(name, 0, sizeof(H5G_name_t));
+ memset(name, 0, sizeof(H5G_name_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_name_reset() */
@@ -1111,7 +1111,7 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size, si
herr_t ret_value = SUCCEED; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index a705365..8df3a75 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -610,7 +610,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
snrt_flags |= H5AC__DIRTIED_FLAG;
/* The left node */
- HDmemset(sn->entry + H5F_SYM_LEAF_K(f), 0, H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
+ memset(sn->entry + H5F_SYM_LEAF_K(f), 0, H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
sn->nsyms = H5F_SYM_LEAF_K(f);
sn_flags |= H5AC__DIRTIED_FLAG;
@@ -645,8 +645,8 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
/* Move entries down to make room for new entry */
assert(idx >= 0);
- HDmemmove(insert_into->entry + idx + 1, insert_into->entry + idx,
- (insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t));
+ memmove(insert_into->entry + idx + 1, insert_into->entry + idx,
+ (insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t));
/* Copy new entry into table */
H5G__ent_copy(&(insert_into->entry[idx]), &ent, H5_COPY_SHALLOW);
@@ -810,7 +810,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
*/
sn->nsyms -= 1;
sn_flags |= H5AC__DIRTIED_FLAG;
- HDmemmove(sn->entry + idx, sn->entry + idx + 1, (sn->nsyms - idx) * sizeof(H5G_entry_t));
+ memmove(sn->entry + idx, sn->entry + idx + 1, (sn->nsyms - idx) * sizeof(H5G_entry_t));
ret_value = H5B_INS_NOOP;
}
else if (idx + 1 == sn->nsyms) {
@@ -832,7 +832,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
*/
sn->nsyms -= 1;
sn_flags |= H5AC__DIRTIED_FLAG;
- HDmemmove(sn->entry + idx, sn->entry + idx + 1, (sn->nsyms - idx) * sizeof(H5G_entry_t));
+ memmove(sn->entry + idx, sn->entry + idx + 1, (sn->nsyms - idx) * sizeof(H5G_entry_t));
ret_value = H5B_INS_NOOP;
} /* end else */
} /* end if */
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index c61416f..45b1be9 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -681,7 +681,7 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
herr_t ret_value = SUCCEED; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index d2020f3..1e71396 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -669,7 +669,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* XXX: Should we allow user to control the group creation params here? -QAK */
gcrt_info.gcpl_id = H5P_GROUP_CREATE_DEFAULT;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
if (H5G__obj_create_real(grp_oloc.file, ginfo, linfo, pline, &gcrt_info,
obj_loc.oloc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 139b2f5..4acec44 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -203,7 +203,7 @@ H5HF__hdr_prefix_decode(H5HF_hdr_t *hdr, const uint8_t **image_ref)
assert(image);
/* Magic number */
- if (HDmemcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "wrong fractal heap header signature")
image += H5_SIZEOF_MAGIC;
@@ -945,7 +945,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
assert(iblock->size == len);
/* Magic number */
- if (HDmemcmp(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap indirect block signature")
image += H5_SIZEOF_MAGIC;
@@ -1602,7 +1602,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
chk_p -= H5HF_SIZEOF_CHKSUM;
/* Reset checksum field, for computing the checksum */
- HDmemset(chk_p, 0, (size_t)H5HF_SIZEOF_CHKSUM);
+ memset(chk_p, 0, (size_t)H5HF_SIZEOF_CHKSUM);
/* Compute checksum on entire direct block */
computed_chksum = H5_checksum_metadata(read_buf, len, 0);
@@ -1680,7 +1680,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Allocate space for the fractal heap direct block */
if (NULL == (dblock = H5FL_CALLOC(H5HF_direct_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Set the shared heap header's file context for this operation */
hdr->f = udata->f;
@@ -1759,7 +1759,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
image = dblock->blk;
/* Magic number */
- if (HDmemcmp(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap direct block signature")
image += H5_SIZEOF_MAGIC;
@@ -2048,7 +2048,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
uint32_t metadata_chksum; /* Computed metadata checksum value */
/* Clear the checksum field, to compute the checksum */
- HDmemset(image, 0, (size_t)H5HF_SIZEOF_CHKSUM);
+ memset(image, 0, (size_t)H5HF_SIZEOF_CHKSUM);
/* Compute checksum on entire direct block */
metadata_chksum = H5_checksum_metadata(dblock->blk, dblock->size, 0);
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index fe9819d..d91f963 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -99,7 +99,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fractal heap direct block")
/* Reset the metadata cache info for the heap header */
- HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Share common heap information */
dblock->hdr = hdr;
@@ -129,7 +129,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
/* XXX: Change to using free-list factories */
if ((dblock->blk = H5FL_BLK_MALLOC(direct_block, dblock->size)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(dblock->blk, 0, dblock->size);
+ memset(dblock->blk, 0, dblock->size);
dblock->write_buf = NULL;
dblock->write_size = 0;
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index b78a1e2..fd23698 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -945,7 +945,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
"memory allocation failed for fractal heap indirect block")
/* Reset the metadata cache info for the heap header */
- HDmemset(&iblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&iblock->cache_info, 0, sizeof(H5AC_info_t));
/* Share common heap information */
iblock->hdr = hdr;
diff --git a/src/H5HFiter.c b/src/H5HFiter.c
index 9fa9d97..caa5d99 100644
--- a/src/H5HFiter.c
+++ b/src/H5HFiter.c
@@ -86,7 +86,7 @@ H5HF__man_iter_init(H5HF_block_iter_t *biter)
assert(biter);
/* Reset block iterator information */
- HDmemset(biter, 0, sizeof(H5HF_block_iter_t));
+ memset(biter, 0, sizeof(H5HF_block_iter_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF__man_iter_init() */
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index f3524e1..b7e5910 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -2747,8 +2747,8 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Adjust direct row sections for indirect section */
if (sect->u.indirect.dir_nrows > 0) {
assert(sect->u.indirect.dir_rows);
- HDmemmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[1],
- sect->u.indirect.dir_nrows * sizeof(H5HF_free_section_t *));
+ memmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[1],
+ sect->u.indirect.dir_nrows * sizeof(H5HF_free_section_t *));
assert(sect->u.indirect.dir_rows[0]);
/* Make new "first row" in indirect section */
@@ -2841,8 +2841,8 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Transfer row sections between current & peer sections */
H5MM_memcpy(&peer_sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[0],
(sizeof(H5HF_free_section_t *) * peer_dir_nrows));
- HDmemmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[peer_dir_nrows],
- (sizeof(H5HF_free_section_t *) * (sect->u.indirect.dir_nrows - peer_dir_nrows)));
+ memmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[peer_dir_nrows],
+ (sizeof(H5HF_free_section_t *) * (sect->u.indirect.dir_nrows - peer_dir_nrows)));
sect->u.indirect.dir_nrows -= peer_dir_nrows;
assert(row_sect == sect->u.indirect.dir_rows[0]);
@@ -2991,8 +2991,8 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/* Adjust indirect entry information */
sect->u.indirect.indir_nents--;
- HDmemmove(&sect->u.indirect.indir_ents[0], &sect->u.indirect.indir_ents[1],
- sect->u.indirect.indir_nents * sizeof(H5HF_free_section_t *));
+ memmove(&sect->u.indirect.indir_ents[0], &sect->u.indirect.indir_ents[1],
+ sect->u.indirect.indir_nents * sizeof(H5HF_free_section_t *));
assert(sect->u.indirect.indir_ents[0]);
/* Make new "first row" in new first indirect child section */
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index fb656c0..7453489 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -152,7 +152,7 @@ H5HF__tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
} /* end else */
H5MM_memcpy(id, obj, obj_size);
- HDmemset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
+ memset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
/* Update statistics about heap */
hdr->tiny_size += obj_size;
diff --git a/src/H5HG.c b/src/H5HG.c
index 45301d2..aa11889 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -142,7 +142,7 @@ H5HG__create(H5F_t *f, size_t size)
if (NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
- HDmemset(heap->chunk, 0, size);
+ memset(heap->chunk, 0, size);
heap->nalloc = H5HG_NOBJS(f, size);
heap->nused = 1; /* account for index 0, which is used for the free object */
if (NULL == (heap->obj = H5FL_SEQ_MALLOC(H5HG_obj_t, heap->nalloc)))
@@ -303,7 +303,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, 0, "memory allocation failed")
/* Clear newly allocated space */
- HDmemset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
+ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
/* Update heap information */
heap->nalloc = new_alloc;
@@ -401,7 +401,7 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need)
/* Re-allocate the heap information in memory */
if (NULL == (new_chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, (heap->size + need))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "new heap allocation failed")
- HDmemset(new_chunk + heap->size, 0, need);
+ memset(new_chunk + heap->size, 0, need);
/* Adjust the size of the heap */
old_size = heap->size;
@@ -745,7 +745,7 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
} /* end if */
else
heap->obj[0].size += need;
- HDmemmove(obj_start, obj_start + need, heap->size - (size_t)((obj_start + need) - heap->chunk));
+ memmove(obj_start, obj_start + need, heap->size - (size_t)((obj_start + need) - heap->chunk));
if (heap->obj[0].size >= H5HG_SIZEOF_OBJHDR(f)) {
p = heap->obj[0].begin;
UINT16ENCODE(p, 0); /*id*/
@@ -753,7 +753,7 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
} /* end if */
- HDmemset(heap->obj + hobj->idx, 0, sizeof(H5HG_obj_t));
+ memset(heap->obj + hobj->idx, 0, sizeof(H5HG_obj_t));
flags |= H5AC__DIRTIED_FLAG;
if ((heap->obj[0].size + H5HG_SIZEOF_HDR(f)) == heap->size) {
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index 8465537..0872412 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -116,7 +116,7 @@ H5HG__hdr_deserialize(H5HG_heap_t *heap, const uint8_t *image, size_t len, const
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad global heap collection signature")
image += H5_SIZEOF_MAGIC;
@@ -312,7 +312,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear newly allocated space */
- HDmemset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
+ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
/* Update heap information */
heap->nalloc = new_alloc;
diff --git a/src/H5HL.c b/src/H5HL.c
index e5d622f..ef1cd07 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -695,7 +695,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
/* Clear new section so junk doesn't appear in the file */
/* (Avoid clearing section which will be overwritten with newly inserted data) */
- HDmemset(heap->dblk_image + offset + buf_size, 0, (new_dblk_size - (offset + buf_size)));
+ memset(heap->dblk_image + offset + buf_size, 0, (new_dblk_size - (offset + buf_size)));
}
/* Copy the data into the heap */
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 87a9d8e..115062f 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -158,7 +158,7 @@ H5HL__hdr_deserialize(H5HL_t *heap, const uint8_t *image, size_t len, H5HL_cache
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad local heap signature")
image += H5_SIZEOF_MAGIC;
@@ -355,7 +355,7 @@ H5HL__cache_prefix_get_final_load_size(const void *_image, size_t image_len, voi
assert(actual_len);
assert(*actual_len == image_len);
- HDmemset(&heap, 0, sizeof(H5HL_t));
+ memset(&heap, 0, sizeof(H5HL_t));
/* Deserialize the heap's header */
if (H5HL__hdr_deserialize(&heap, (const uint8_t *)image, image_len, udata) < 0)
@@ -574,7 +574,7 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
* the prefix and the data block due to alignment constraints.
*/
gap = heap->prfx_size - (size_t)(image - (uint8_t *)_image);
- HDmemset(image, 0, gap);
+ memset(image, 0, gap);
image += gap;
}
@@ -592,7 +592,7 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of local heap */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
}
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Lint.c b/src/H5Lint.c
index 628464c..d6da518 100644
--- a/src/H5Lint.c
+++ b/src/H5Lint.c
@@ -379,7 +379,7 @@ H5L_unregister(H5L_type_t id)
/* Remove filter from table */
/* Don't worry about shrinking table size (for now) */
- HDmemmove(&H5L_table_g[i], &H5L_table_g[i + 1], sizeof(H5L_class_t) * ((H5L_table_used_g - 1) - i));
+ memmove(&H5L_table_g[i], &H5L_table_g[i + 1], sizeof(H5L_class_t) * ((H5L_table_used_g - 1) - i));
H5L_table_used_g--;
done:
@@ -624,7 +624,7 @@ done:
H5O_loc_t oloc; /* Object location for created object */
/* Set up object location */
- HDmemset(&oloc, 0, sizeof(oloc));
+ memset(&oloc, 0, sizeof(oloc));
oloc.file = grp_loc->oloc->file;
oloc.addr = udata->lnk->u.hard.addr;
diff --git a/src/H5MF.c b/src/H5MF.c
index f9702f3..a86bfef 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -195,7 +195,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
switch (mapping_type) {
case H5MF_AGGR_MERGE_SEPARATE:
/* Don't merge any metadata together */
- HDmemset(f_sh->fs_aggr_merge, 0, sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, 0, sizeof(f_sh->fs_aggr_merge));
/* Check if merging raw data should be allowed */
/* (treat global heaps as raw data) */
@@ -208,7 +208,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
case H5MF_AGGR_MERGE_DICHOTOMY:
/* Merge all metadata together (but not raw data) */
- HDmemset(f_sh->fs_aggr_merge, H5F_FS_MERGE_METADATA, sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, H5F_FS_MERGE_METADATA, sizeof(f_sh->fs_aggr_merge));
/* Allow merging raw data allocations together */
/* (treat global heaps as raw data) */
@@ -218,8 +218,8 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
case H5MF_AGGR_MERGE_TOGETHER:
/* Merge all allocation types together */
- HDmemset(f_sh->fs_aggr_merge, (H5F_FS_MERGE_METADATA | H5F_FS_MERGE_RAWDATA),
- sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, (H5F_FS_MERGE_METADATA | H5F_FS_MERGE_RAWDATA),
+ sizeof(f_sh->fs_aggr_merge));
break;
default:
@@ -2568,8 +2568,8 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
assert(fsm_settled);
/* Initialize structs */
- HDmemset(&fsinfo, 0, sizeof(fsinfo));
- HDmemset(&fs_stat, 0, sizeof(fs_stat));
+ memset(&fsinfo, 0, sizeof(fsinfo));
+ memset(&fs_stat, 0, sizeof(fs_stat));
/*
* Only need to settle things if we are persisting free space and
@@ -2591,8 +2591,8 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
assert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
/* Initialize fsm_opened and fsm_visited */
- HDmemset(fsm_opened, 0, sizeof(fsm_opened));
- HDmemset(fsm_visited, 0, sizeof(fsm_visited));
+ memset(fsm_opened, 0, sizeof(fsm_opened));
+ memset(fsm_visited, 0, sizeof(fsm_visited));
/* 1) Reduce the EOA to the extent possible. */
diff --git a/src/H5MM.c b/src/H5MM.c
index d65344b..d45c1c3 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -308,7 +308,7 @@ H5MM_memcpy(void *dest, const void *src, size_t n)
assert((char *)dest >= (const char *)src + n || (const char *)src >= (char *)dest + n);
/* Copy */
- ret = HDmemcpy(dest, src, n);
+ ret = memcpy(dest, src, n);
FUNC_LEAVE_NOAPI(ret)
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index f6c1b21..79c8b10 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -149,9 +149,9 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
oh->mesg[u].raw -= new_gap_size;
/* Slide raw message info forward in chunk image */
- HDmemmove(new_gap_loc, new_gap_loc + new_gap_size,
- (size_t)((oh->chunk[chunkno].image + (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh))) -
- (new_gap_loc + new_gap_size)));
+ memmove(new_gap_loc, new_gap_loc + new_gap_size,
+ (size_t)((oh->chunk[chunkno].image + (oh->chunk[chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh))) -
+ (new_gap_loc + new_gap_size)));
/* Add existing gap size to new gap size */
new_gap_size += oh->chunk[chunkno].gap;
@@ -179,7 +179,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
/* Zero out new null message's raw data */
if (null_msg->raw_size)
- HDmemset(null_msg->raw, 0, null_msg->raw_size);
+ memset(null_msg->raw, 0, null_msg->raw_size);
/* Mark message as dirty */
null_msg->dirty = TRUE;
@@ -265,10 +265,10 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
/* Slide raw message info in chunk image */
if (null_before_gap)
/* Slide messages down */
- HDmemmove(move_start + gap_size, move_start, (size_t)(move_end - move_start));
+ memmove(move_start + gap_size, move_start, (size_t)(move_end - move_start));
else {
/* Slide messages up */
- HDmemmove(move_start - gap_size, move_start, (size_t)(move_end - move_start));
+ memmove(move_start - gap_size, move_start, (size_t)(move_end - move_start));
/* Adjust start of null message */
mesg->raw -= gap_size;
@@ -276,14 +276,14 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
}
else if (move_end == move_start && !null_before_gap) {
/* Slide null message up */
- HDmemmove(move_start - gap_size, move_start, mesg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ memmove(move_start - gap_size, move_start, mesg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Adjust start of null message */
mesg->raw -= gap_size;
} /* end if */
/* Zero out addition to null message */
- HDmemset(mesg->raw + mesg->raw_size, 0, gap_size);
+ memset(mesg->raw + mesg->raw_size, 0, gap_size);
/* Adjust size of null message */
mesg->raw_size += gap_size;
@@ -440,7 +440,7 @@ H5O__alloc_msgs(H5O_t *oh, size_t min_alloc)
oh->mesg = new_mesg;
/* Set new object header info to zeros */
- HDmemset(&oh->mesg[old_alloc], 0, (oh->alloc_nmesgs - old_alloc) * sizeof(H5O_mesg_t));
+ memset(&oh->mesg[old_alloc], 0, (oh->alloc_nmesgs - old_alloc) * sizeof(H5O_mesg_t));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -615,13 +615,13 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
oh->chunk[chunkno].gap = 0;
/* Wipe new space for chunk */
- HDmemset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
+ memset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
/* Move chunk 0 data up if the size flags changed */
if (adjust_size_flags)
- HDmemmove(oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh),
- oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh) - extra_prfx_size,
- old_size - (size_t)H5O_SIZEOF_HDR(oh) + extra_prfx_size);
+ memmove(oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh),
+ oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh) - extra_prfx_size,
+ old_size - (size_t)H5O_SIZEOF_HDR(oh) + extra_prfx_size);
/* Spin through existing messages, adjusting them */
for (u = 0; u < oh->nmesgs; u++) {
@@ -940,7 +940,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
if (curr_msg->type->id == H5O_NULL_ID) {
/* Delete the null message */
if (u < oh->nmesgs - 1)
- HDmemmove(curr_msg, curr_msg + 1, ((oh->nmesgs - 1) - u) * sizeof(H5O_mesg_t));
+ memmove(curr_msg, curr_msg + 1, ((oh->nmesgs - 1) - u) * sizeof(H5O_mesg_t));
oh->nmesgs--;
} /* end if */
else {
@@ -1036,8 +1036,8 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
/* Remove null message from list of messages */
if (found_msg->null_msgno < (oh->nmesgs - 1))
- HDmemmove(old_null_msg, old_null_msg + 1,
- ((oh->nmesgs - 1) - found_msg->null_msgno) * sizeof(H5O_mesg_t));
+ memmove(old_null_msg, old_null_msg + 1,
+ ((oh->nmesgs - 1) - found_msg->null_msgno) * sizeof(H5O_mesg_t));
/* Decrement # of messages */
/* (Don't bother reducing size of message array for now -QAK) */
@@ -1347,7 +1347,7 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
mesg->type = H5O_MSG_NULL;
assert(mesg->raw + mesg->raw_size <= (oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) -
(H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap));
- HDmemset(mesg->raw, 0, mesg->raw_size);
+ memset(mesg->raw, 0, mesg->raw_size);
/* Clear message flags */
mesg->flags = 0;
@@ -1498,8 +1498,8 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
/* Release any information/memory for continuation message */
H5O__msg_free_mesg(cont_msg);
if (cont_u < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[cont_u], &oh->mesg[cont_u + 1],
- ((oh->nmesgs - 1) - cont_u) * sizeof(H5O_mesg_t));
+ memmove(&oh->mesg[cont_u], &oh->mesg[cont_u + 1],
+ ((oh->nmesgs - 1) - cont_u) * sizeof(H5O_mesg_t));
oh->nmesgs--;
} /* end else */
@@ -1516,8 +1516,8 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
/* Remove from message list */
if (v < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[v], &oh->mesg[v + 1],
- ((oh->nmesgs - 1) - v) * sizeof(H5O_mesg_t));
+ memmove(&oh->mesg[v], &oh->mesg[v + 1],
+ ((oh->nmesgs - 1) - v) * sizeof(H5O_mesg_t));
oh->nmesgs--;
} /* end if */
} /* end if */
@@ -1606,9 +1606,9 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
"unable to load object header chunk")
/* Copy raw data for non-null message to new location */
- HDmemmove(curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh),
- nonnull_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh),
- nonnull_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ memmove(curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh),
+ nonnull_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh),
+ nonnull_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Adjust non-null message's offset in chunk */
nonnull_msg->raw = curr_msg->raw;
@@ -2009,8 +2009,8 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
/* Remove second message from list of messages */
if (v < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[v], &oh->mesg[v + 1],
- ((oh->nmesgs - 1) - v) * sizeof(H5O_mesg_t));
+ memmove(&oh->mesg[v], &oh->mesg[v + 1],
+ ((oh->nmesgs - 1) - v) * sizeof(H5O_mesg_t));
/* Decrement # of messages */
/* (Don't bother reducing size of message array for now -QAK) */
@@ -2148,8 +2148,8 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
/* Remove chunk from list of chunks */
if (null_msg->chunkno < (oh->nchunks - 1)) {
- HDmemmove(&oh->chunk[null_msg->chunkno], &oh->chunk[null_msg->chunkno + 1],
- ((oh->nchunks - 1) - null_msg->chunkno) * sizeof(H5O_chunk_t));
+ memmove(&oh->chunk[null_msg->chunkno], &oh->chunk[null_msg->chunkno + 1],
+ ((oh->nchunks - 1) - null_msg->chunkno) * sizeof(H5O_chunk_t));
/* Adjust chunk number for any chunk proxies that are in the cache */
for (u = null_msg->chunkno; u < (oh->nchunks - 1); u++) {
@@ -2182,8 +2182,8 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
/* Remove null message from list of messages */
if (null_msg_no < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[null_msg_no], &oh->mesg[null_msg_no + 1],
- ((oh->nmesgs - 1) - null_msg_no) * sizeof(H5O_mesg_t));
+ memmove(&oh->mesg[null_msg_no], &oh->mesg[null_msg_no + 1],
+ ((oh->nmesgs - 1) - null_msg_no) * sizeof(H5O_mesg_t));
/* Decrement # of messages */
/* (Don't bother reducing size of message array for now -QAK) */
@@ -2354,8 +2354,8 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
uint8_t *src = curr_msg->raw + curr_msg->raw_size; /* Source location */
/* Slide down the raw data */
- HDmemmove(curr_msg->raw - sizeof_msghdr, src,
- (size_t)(old_image + new_size - sizeof_chksum - src));
+ memmove(curr_msg->raw - sizeof_msghdr, src,
+ (size_t)(old_image + new_size - sizeof_chksum - src));
/* Update the raw data pointers for messages after this one */
for (v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++)
@@ -2371,7 +2371,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Remove the deleted null message from list of messages */
if (u < (oh->nmesgs - 1))
- HDmemmove(&oh->mesg[u], &oh->mesg[u + 1], ((oh->nmesgs - 1) - u) * sizeof(H5O_mesg_t));
+ memmove(&oh->mesg[u], &oh->mesg[u + 1], ((oh->nmesgs - 1) - u) * sizeof(H5O_mesg_t));
/* Decrement # of messages */
/* (Don't bother reducing size of message array for now) */
@@ -2430,9 +2430,9 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
oh->flags |= new_size_flags;
/* Slide chunk 0 data down */
- HDmemmove(chunk->image + H5O_SIZEOF_HDR(oh) - sizeof_chksum,
- chunk->image + H5O_SIZEOF_HDR(oh) - sizeof_chksum + less_prfx_size,
- new_size - (size_t)H5O_SIZEOF_HDR(oh));
+ memmove(chunk->image + H5O_SIZEOF_HDR(oh) - sizeof_chksum,
+ chunk->image + H5O_SIZEOF_HDR(oh) - sizeof_chksum + less_prfx_size,
+ new_size - (size_t)H5O_SIZEOF_HDR(oh));
/* Adjust chunk size */
new_size -= less_prfx_size;
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 1a0255b..5dcf690 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -373,7 +373,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
H5MM_memcpy(p, attr->shared->name, name_len);
if (attr->shared->version < H5O_ATTR_VERSION_2) {
/* Pad to the correct number of bytes */
- HDmemset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len);
+ memset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len);
p += H5O_ALIGN_OLD(name_len);
} /* end if */
else
@@ -384,7 +384,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute datatype")
if (attr->shared->version < H5O_ATTR_VERSION_2) {
- HDmemset(p + attr->shared->dt_size, 0, H5O_ALIGN_OLD(attr->shared->dt_size) - attr->shared->dt_size);
+ memset(p + attr->shared->dt_size, 0, H5O_ALIGN_OLD(attr->shared->dt_size) - attr->shared->dt_size);
p += H5O_ALIGN_OLD(attr->shared->dt_size);
} /* end if */
else
@@ -395,7 +395,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute dataspace")
if (attr->shared->version < H5O_ATTR_VERSION_2) {
- HDmemset(p + attr->shared->ds_size, 0, H5O_ALIGN_OLD(attr->shared->ds_size) - attr->shared->ds_size);
+ memset(p + attr->shared->ds_size, 0, H5O_ALIGN_OLD(attr->shared->ds_size) - attr->shared->ds_size);
p += H5O_ALIGN_OLD(attr->shared->ds_size);
} /* end if */
else
@@ -405,7 +405,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
if (attr->shared->data)
H5MM_memcpy(p, attr->shared->data, attr->shared->data_size);
else
- HDmemset(p, 0, attr->shared->data_size);
+ memset(p, 0, attr->shared->data_size);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index dd1a640..649b8d1 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -397,7 +397,7 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
/* Verify magic number */
- assert(!HDmemcmp(chunk_image, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC));
+ assert(!memcmp(chunk_image, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC));
chunk_image += H5_SIZEOF_MAGIC;
/* Version */
@@ -468,7 +468,7 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
UINT32ENCODE(chunk_image, (oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh)));
/* Zero to alignment */
- HDmemset(chunk_image, 0, (size_t)(H5O_SIZEOF_HDR(oh) - 12));
+ memset(chunk_image, 0, (size_t)(H5O_SIZEOF_HDR(oh) - 12));
chunk_image += (size_t)(H5O_SIZEOF_HDR(oh) - 12);
}
@@ -705,8 +705,8 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
/* Sanity check that the chunk representation we have in memory is
* the same as the one being brought in from disk.
*/
- assert(0 == HDmemcmp(image, udata->oh->chunk[chk_proxy->chunkno].image,
- udata->oh->chunk[chk_proxy->chunkno].size));
+ assert(0 == memcmp(image, udata->oh->chunk[chk_proxy->chunkno].image,
+ udata->oh->chunk[chk_proxy->chunkno].size));
}
/* Increment reference count of object header */
@@ -1002,7 +1002,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
/* (indicates version 2 or later) */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (!HDmemcmp(image, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ if (!memcmp(image, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/* Magic number (bounds checked above) */
image += H5_SIZEOF_MAGIC;
@@ -1248,7 +1248,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(chunk_image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(chunk_image, H5O_CHK_MAGIC, H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(chunk_image, H5O_CHK_MAGIC, H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "wrong object header chunk signature")
chunk_image += H5_SIZEOF_MAGIC;
}
@@ -1573,8 +1573,8 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Sanity checks */
if (oh->version > H5O_VERSION_1)
/* Make certain the magic # is present */
- assert(!HDmemcmp(oh->chunk[chunkno].image, (chunkno == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC),
- H5_SIZEOF_MAGIC));
+ assert(!memcmp(oh->chunk[chunkno].image, (chunkno == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC),
+ H5_SIZEOF_MAGIC));
else
/* Gaps should never occur in version 1 of the format */
assert(oh->chunk[chunkno].gap == 0);
@@ -1586,9 +1586,9 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Check for gap in chunk & zero it out */
if (oh->chunk[chunkno].gap)
- HDmemset((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
- (H5O_SIZEOF_CHKSUM + oh->chunk[chunkno].gap),
- 0, oh->chunk[chunkno].gap);
+ memset((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
+ (H5O_SIZEOF_CHKSUM + oh->chunk[chunkno].gap),
+ 0, oh->chunk[chunkno].gap);
/* Compute metadata checksum */
metadata_chksum =
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index a05326f..d96940a 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -171,7 +171,7 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx)
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
- HDmemset(&chk_udata, 0, sizeof(chk_udata));
+ memset(&chk_udata, 0, sizeof(chk_udata));
chk_udata.oh = oh;
chk_udata.chunkno = idx;
chk_udata.size = oh->chunk[idx].size;
@@ -307,7 +307,7 @@ H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx)
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
- HDmemset(&chk_udata, 0, sizeof(chk_udata));
+ memset(&chk_udata, 0, sizeof(chk_udata));
chk_udata.oh = oh;
chk_udata.chunkno = idx;
chk_udata.size = oh->chunk[idx].size;
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 3e72e83..f999642 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -344,7 +344,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
*/
if (NULL == (deleted = (hbool_t *)H5MM_malloc(sizeof(hbool_t) * oh_src->nmesgs)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
+ memset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
/* "pre copy" pass over messages, to gather information for actual message copy operation
* (for messages which depend on information from other messages)
@@ -944,7 +944,7 @@ H5O__copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t
assert(oloc_dst->file);
/* Initialize copy info before errors can be thrown */
- HDmemset(&cpy_info, 0, sizeof(H5O_copy_t));
+ memset(&cpy_info, 0, sizeof(H5O_copy_t));
/* Get the copy property list */
if (NULL == (ocpy_plist = (H5P_genplist_t *)H5I_object(ocpypl_id)))
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index a55caa0..6e21990 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -171,8 +171,8 @@ H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
H5O_token_t tmp_token = {0};
/* If data is not initialized, copy zeros and skip */
- if (0 == HDmemcmp(src_buf, zeros, buf_size))
- HDmemset(dst_buf, 0, buf_size);
+ if (0 == memcmp(src_buf, zeros, buf_size))
+ memset(dst_buf, 0, buf_size);
else {
/* Set up for the object copy for the reference */
if (H5R__decode_token_obj_compat(src_buf, &buf_size, &tmp_token, token_size) < 0)
@@ -234,8 +234,8 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
uint8_t *q;
/* If data is not initialized, copy zeros and skip */
- if (0 == HDmemcmp(src_buf, zeros, buf_size))
- HDmemset(dst_buf, 0, buf_size);
+ if (0 == memcmp(src_buf, zeros, buf_size))
+ memset(dst_buf, 0, buf_size);
else {
/* Read from heap */
if (H5R__decode_heap(src_oloc->file, src_buf, &buf_size, &data, &data_size) < 0)
@@ -359,7 +359,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt
H5R_ref_priv_t *ref = (H5R_ref_priv_t *)&ref_ptr[i];
/* Check for null reference - only expand reference if it is not null */
- if (HDmemcmp(ref, zeros, H5R_REF_BUF_SIZE)) {
+ if (memcmp(ref, zeros, H5R_REF_BUF_SIZE)) {
H5O_token_t tmp_token = {0};
/* Get src object address */
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index ce2667f..6fd7b32 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -112,7 +112,7 @@ H5O__assert(const H5O_t *oh)
/* Version specific checks */
if (oh->version > H5O_VERSION_1) {
/* Make certain that the magic number is correct for each chunk */
- assert(!HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
+ assert(!memcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
/* Check for valid gap size */
assert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index 7088eca..ae45d16 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -94,7 +94,7 @@ H5O__reset_info1(H5O_info1_t *oinfo)
FUNC_ENTER_PACKAGE_NOERR
/* Reset the passed-in info struct */
- HDmemset(oinfo, 0, sizeof(H5O_info1_t));
+ memset(oinfo, 0, sizeof(H5O_info1_t));
oinfo->type = H5O_TYPE_UNKNOWN;
oinfo->addr = HADDR_UNDEF;
diff --git a/src/H5Oint.c b/src/H5Oint.c
index 839f4ae..78d72b5 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -994,7 +994,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
udata.common.f = loc->file;
udata.common.file_intent = file_intent;
udata.common.merged_null_msgs = 0;
- HDmemset(&cont_msg_info, 0, sizeof(cont_msg_info));
+ memset(&cont_msg_info, 0, sizeof(cont_msg_info));
udata.common.cont_msg_info = &cont_msg_info;
udata.common.addr = loc->addr;
@@ -1777,7 +1777,7 @@ H5O_loc_reset(H5O_loc_t *loc)
assert(loc);
/* Clear the object location to an empty state */
- HDmemset(loc, 0, sizeof(H5O_loc_t));
+ memset(loc, 0, sizeof(H5O_loc_t));
loc->addr = HADDR_UNDEF;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1964,7 +1964,7 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr)
assert(hdr);
/* Reset the object header info structure */
- HDmemset(hdr, 0, sizeof(*hdr));
+ memset(hdr, 0, sizeof(*hdr));
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2196,7 +2196,7 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class")
/* Reset the object info structure */
- HDmemset(oinfo, 0, sizeof(*oinfo));
+ memset(oinfo, 0, sizeof(*oinfo));
/* Get the information for the object header, if requested */
if (fields & H5O_NATIVE_INFO_HDR)
@@ -2625,7 +2625,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or
FUNC_ENTER_PACKAGE
/* Portably initialize user data struct to zeros */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
/* Check args */
assert(loc);
@@ -2927,7 +2927,7 @@ H5O__reset_info2(H5O_info2_t *oinfo)
FUNC_ENTER_PACKAGE_NOERR
/* Reset the passed-in info struct */
- HDmemset(oinfo, 0, sizeof(H5O_info2_t));
+ memset(oinfo, 0, sizeof(H5O_info2_t));
oinfo->type = H5O_TYPE_UNKNOWN;
oinfo->token = H5O_TOKEN_UNDEF;
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 93a5826..a49fa4d 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -815,7 +815,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
if (mesg->storage.u.compact.buf)
H5MM_memcpy(p, mesg->storage.u.compact.buf, mesg->storage.u.compact.size);
else
- HDmemset(p, 0, mesg->storage.u.compact.size);
+ memset(p, 0, mesg->storage.u.compact.size);
p += mesg->storage.u.compact.size;
} /* end if */
break;
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 855c25d..ce53f32 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -557,7 +557,7 @@ H5O__msg_reset_real(const H5O_msg_class_t *type, void *native)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "reset method failed")
} /* end if */
else
- HDmemset(native, 0, type->native_size);
+ memset(native, 0, type->native_size);
} /* end if */
done:
@@ -1529,7 +1529,7 @@ H5O_msg_reset_share(unsigned H5_ATTR_NDEBUG_UNUSED type_id, void *mesg)
assert(mesg);
/* Reset the shared component in the message to zero. */
- HDmemset((H5O_shared_t *)mesg, 0, sizeof(H5O_shared_t));
+ memset((H5O_shared_t *)mesg, 0, sizeof(H5O_shared_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_msg_reset_share() */
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 5fba225..71a0974 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -188,7 +188,7 @@ H5O__mtime_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message")
/* Convert YYYYMMDDhhmmss UTC to a time_t. */
- HDmemset(&tm, 0, sizeof tm);
+ memset(&tm, 0, sizeof tm);
tm.tm_year = (p[0] - '0') * 1000 + (p[1] - '0') * 100 + (p[2] - '0') * 10 + (p[3] - '0') - 1900;
tm.tm_mon = (p[4] - '0') * 10 + (p[5] - '0') - 1;
tm.tm_mday = (p[6] - '0') * 10 + (p[7] - '0');
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 9cd95a9..f944235 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -651,7 +651,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
*/
char name[64];
- HDmemset(name, 0, 64);
+ memset(name, 0, 64);
HDsnprintf(name, sizeof(name), "Filter at position %zu", i);
fprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index d880a66..99e3715 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -94,7 +94,7 @@
//! <!-- [H5O_native_info_fields_snip] -->
/* Convenience macro to check if the token is the 'undefined' token value */
-#define H5O_IS_TOKEN_UNDEF(token) (!HDmemcmp(&(token), &(H5O_TOKEN_UNDEF), sizeof(H5O_token_t)))
+#define H5O_IS_TOKEN_UNDEF(token) (!memcmp(&(token), &(H5O_TOKEN_UNDEF), sizeof(H5O_token_t)))
/*******************/
/* Public Typedefs */
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index d10b298..aef49f0 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -308,7 +308,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_
#endif /* H5O_SHARED_COPY_FILE_REAL */
/* Reset shared message info for new message */
- HDmemset(dst_mesg, 0, sizeof(H5O_shared_t));
+ memset(dst_mesg, 0, sizeof(H5O_shared_t));
/* Handle sharing destination message */
if (H5O__shared_copy_file(file_src, file_dst, H5O_SHARED_TYPE, _native_src, dst_mesg, recompute_size,
diff --git a/src/H5PB.c b/src/H5PB.c
index 449d0c2..d90d8a4 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -1196,9 +1196,9 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
if (NULL == (new_page_buf = H5FL_FAC_MALLOC(page_buf->page_fac)))
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTALLOC, FAIL,
"memory allocation failed for page buffer entry")
- HDmemset(new_page_buf, 0, (size_t)offset);
- HDmemset((uint8_t *)new_page_buf + offset + access_size, 0,
- page_size - ((size_t)offset + access_size));
+ memset(new_page_buf, 0, (size_t)offset);
+ memset((uint8_t *)new_page_buf + offset + access_size, 0,
+ page_size - ((size_t)offset + access_size));
page_entry->page_buf_ptr = new_page_buf;
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 4cfa83e..72be116 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -359,7 +359,7 @@ H5PL__expand_path_table(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for path table failed")
/* Initialize the new memory */
- HDmemset(H5PL_paths_g + H5PL_num_paths_g, 0, (size_t)H5PL_PATH_CAPACITY_ADD * sizeof(char *));
+ memset(H5PL_paths_g + H5PL_num_paths_g, 0, (size_t)H5PL_PATH_CAPACITY_ADD * sizeof(char *));
done:
/* Set the path capacity back if there were problems */
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index a120972..58b5b5b 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -186,7 +186,7 @@ H5PL__expand_cache(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for plugin cache failed")
/* Initialize the new memory */
- HDmemset(H5PL_cache_g + H5PL_num_plugins_g, 0, (size_t)H5PL_CACHE_CAPACITY_ADD * sizeof(H5PL_plugin_t));
+ memset(H5PL_cache_g + H5PL_num_plugins_g, 0, (size_t)H5PL_CACHE_CAPACITY_ADD * sizeof(H5PL_plugin_t));
done:
/* Set the cache capacity back if there were problems */
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 52efa2e..2d3358b 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -1315,7 +1315,7 @@ H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t *boundary, H5D
info.func = func;
info.udata = udata;
- HDmemset(info.boundary, 0, sizeof(info.boundary));
+ memset(info.boundary, 0, sizeof(info.boundary));
/* boundary can be 0 to indicate no boundary is set */
for (u = 0; u < ndims; u++) {
if (boundary[u] != (boundary[u] & 0xffffffff)) /* negative value (including H5S_UNLIMITED) */
@@ -1365,7 +1365,7 @@ H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_appe
/* Assign return values */
if (boundary) {
- HDmemset(boundary, 0, ndims * sizeof(hsize_t));
+ memset(boundary, 0, ndims * sizeof(hsize_t));
if (info.ndims > 0)
for (u = 0; u < info.ndims && u < ndims; u++)
boundary[u] = info.boundary[u];
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 32a04ee..1f226f9 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -1285,7 +1285,7 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t H5_ATTR_UNUSED
if (fill1->buf != NULL && fill2->buf == NULL)
HGOTO_DONE(1);
if (fill1->buf != NULL)
- if ((cmp_value = HDmemcmp(fill1->buf, fill2->buf, (size_t)fill1->size)) != 0)
+ if ((cmp_value = memcmp(fill1->buf, fill2->buf, (size_t)fill1->size)) != 0)
HGOTO_DONE(cmp_value);
/* Check the allocation time for the fill values */
@@ -1932,7 +1932,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/])
/* Verify & initialize property's chunk dims */
H5MM_memcpy(&chunk_layout, &H5D_def_layout_chunk_g, sizeof(H5D_def_layout_chunk_g));
- HDmemset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim));
+ memset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim));
chunk_nelmts = 1;
for (u = 0; u < (unsigned)ndims; u++) {
if (dim[u] == 0)
@@ -2096,7 +2096,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
/* Add virtual dataset mapping entry */
ent = &virtual_layout.storage.u.virt.list[virtual_layout.storage.u.virt.list_nused];
- HDmemset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
+ memset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
if (NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
if (NULL == (ent->source_file_name = H5MM_xstrdup(src_file_name)))
@@ -3104,7 +3104,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/
/* Check for "default" fill value */
if (fill.size == 0) {
- HDmemset(value, 0, H5T_get_size(type));
+ memset(value, 0, H5T_get_size(type));
HGOTO_DONE(SUCCEED);
} /* end if */
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index b8ea7cd..e6f2b0c 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -1932,7 +1932,7 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR
HGOTO_DONE(1);
if (info1->driver_info) {
assert(cls1->fapl_size > 0);
- if (0 != (cmp_value = HDmemcmp(info1->driver_info, info2->driver_info, cls1->fapl_size)))
+ if (0 != (cmp_value = memcmp(info1->driver_info, info2->driver_info, cls1->fapl_size)))
HGOTO_DONE(cmp_value);
} /* end if */
@@ -3709,7 +3709,7 @@ H5P__facc_file_image_info_cmp(const void *_info1, const void *_info2, size_t H5_
if (info1->buffer == NULL && info2->buffer != NULL)
HGOTO_DONE(1)
if (info1->buffer != NULL && info2->buffer != NULL)
- ret_value = HDmemcmp(info1->buffer, info2->buffer, size);
+ ret_value = memcmp(info1->buffer, info2->buffer, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 1f6b681..c126ee3 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -545,7 +545,7 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Set property to default value */
- HDmemset(ginfo, 0, sizeof(H5O_ginfo_t));
+ memset(ginfo, 0, sizeof(H5O_ginfo_t));
*ginfo = H5G_def_ginfo_g;
UINT32DECODE(*pp, ginfo->lheap_size_hint);
@@ -635,7 +635,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded")
/* Set property to default value */
- HDmemset(linfo, 0, sizeof(H5O_linfo_t));
+ memset(linfo, 0, sizeof(H5O_linfo_t));
*linfo = H5G_def_linfo_g;
H5_DECODE_UNSIGNED(*pp, crt_order_flags);
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index dae1d58..773ed64 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -1396,7 +1396,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
nused = (size_t)enc_value;
/* Set property default value */
- HDmemset(pline, 0, sizeof(H5O_pline_t));
+ memset(pline, 0, sizeof(H5O_pline_t));
*pline = H5O_def_pline_g;
for (u = 0; u < nused; u++) {
diff --git a/src/H5R.c b/src/H5R.c
index f64141f..ce54bd2 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -146,7 +146,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_object(&obj_token, cont_info.token_size, (H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference")
@@ -247,7 +247,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_region((const H5O_token_t *)&obj_token, cont_info.token_size, space,
(H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference")
@@ -345,7 +345,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_attr((const H5O_token_t *)&obj_token, cont_info.token_size, attr_name,
(H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create attribute reference")
@@ -387,7 +387,7 @@ H5Rdestroy(H5R_ref_t *ref_ptr)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "unable to destroy reference")
/* Memset back to 0 for safety */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5RS.c b/src/H5RS.c
index d4411d6..eea4ed6 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -124,7 +124,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
if (NULL == (rs->s = (char *)H5FL_BLK_MALLOC(str_buf, rs->max)))
HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed")
if (len)
- HDmemcpy(rs->s, s, len);
+ memcpy(rs->s, s, len);
rs->end = rs->s + len;
*rs->end = '\0';
rs->len = len;
@@ -430,7 +430,7 @@ H5RS_acat(H5RS_str_t *rs, const char *s)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer")
/* Append the string */
- HDmemcpy(rs->end, s, len);
+ memcpy(rs->end, s, len);
rs->end += len;
*rs->end = '\0';
rs->len += len;
@@ -479,7 +479,7 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer")
/* Append the string */
- HDmemcpy(rs->end, s, n);
+ memcpy(rs->end, s, n);
rs->end += n;
*rs->end = '\0';
rs->len += n;
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index 733fa49..c0bce6e 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -195,7 +195,7 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t
/* Zero the heap ID out, may leak heap space if user is re-using
* reference and doesn't have garbage collection turned on
*/
- HDmemset(buf, 0, buf_size);
+ memset(buf, 0, buf_size);
/* Get the amount of space required to serialize the selection */
if ((data_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 2d7f893..53375a7 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -575,7 +575,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
/* Compare object addresses */
if (ref1->token_size != ref2->token_size)
HGOTO_DONE(FALSE);
- if (0 != HDmemcmp(&ref1->info.obj.token, &ref2->info.obj.token, ref1->token_size))
+ if (0 != memcmp(&ref1->info.obj.token, &ref2->info.obj.token, ref1->token_size))
HGOTO_DONE(FALSE);
/* Compare filenames */
@@ -1104,7 +1104,7 @@ H5R__decode_obj_token(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Invalid token size (%u)", *token_size)
/* Make sure that token is initialized */
- HDmemset(obj_token, 0, sizeof(H5O_token_t));
+ memset(obj_token, 0, sizeof(H5O_token_t));
/* Decode token */
H5MM_memcpy(obj_token, p, *token_size);
diff --git a/src/H5S.c b/src/H5S.c
index c94c5ff..6174e74 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1259,7 +1259,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hs
/* Selection related cleanup */
/* Set offset to zeros */
- HDmemset(space->select.offset, 0, sizeof(hsize_t) * space->extent.rank);
+ memset(space->select.offset, 0, sizeof(hsize_t) * space->extent.rank);
space->select.offset_changed = FALSE;
/* If the selection is 'all', update the number of elements selected */
diff --git a/src/H5SM.c b/src/H5SM.c
index 866b4ab..9c01f04 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -475,7 +475,7 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
} /* end else */
/* Create a heap to hold the shared messages that the list or B-tree will index */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5O_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5O_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5O_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -1354,7 +1354,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
* shared message is serialized. -QAK
*/
if (defer)
- HDmemset(&shared.u, 0, sizeof(shared.u));
+ memset(&shared.u, 0, sizeof(shared.u));
#endif /* H5_USING_MEMCHECKER */
} /* end if */
else {
@@ -1933,8 +1933,8 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "shared message info message not present")
/* Portably initialize the arrays */
- HDmemset(index_flags, 0, sizeof(index_flags));
- HDmemset(minsizes, 0, sizeof(minsizes));
+ memset(index_flags, 0, sizeof(index_flags));
+ memset(minsizes, 0, sizeof(minsizes));
/* Set SOHM info from file */
H5F_SET_SOHM_ADDR(f, sohm_table.addr);
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 5a23b05..d61cf4f 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -227,7 +227,7 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
assert(table->table_size == len);
/* Check magic number */
- if (HDmemcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM table signature")
image += H5_SIZEOF_MAGIC;
@@ -537,7 +537,7 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
/* Allocate space for the SOHM list data structure */
if (NULL == (list = H5FL_MALLOC(H5SM_list_t)))
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed")
- HDmemset(&list->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&list->cache_info, 0, sizeof(H5AC_info_t));
/* Allocate list in memory as an array*/
if (NULL == (list->messages = (H5SM_sohm_t *)H5FL_ARR_MALLOC(H5SM_sohm_t, udata->header->list_max)))
@@ -545,7 +545,7 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
list->header = udata->header;
/* Check magic number */
- if (HDmemcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM list signature")
image += H5_SIZEOF_MAGIC;
@@ -670,7 +670,7 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_U
assert((size_t)(image - (uint8_t *)_image) <= list->header->list_size);
/* Clear memory */
- HDmemset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image)));
+ memset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image)));
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index 720f122..26c8341 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -87,7 +87,7 @@ H5SM__compare_cb(const void *obj, size_t obj_len, void *_udata)
udata->ret = -1;
else
/* Sizes are the same. Return result of memcmp */
- udata->ret = HDmemcmp(udata->key->encoding, obj, obj_len);
+ udata->ret = memcmp(udata->key->encoding, obj, obj_len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM__compare_cb() */
@@ -140,7 +140,7 @@ H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
"unable to encode object header message")
assert(udata->key->encoding_size <= mesg->raw_size);
- udata->ret = HDmemcmp(udata->key->encoding, mesg->raw, udata->key->encoding_size);
+ udata->ret = memcmp(udata->key->encoding, mesg->raw, udata->key->encoding_size);
} /* end else */
/* Indicate that we found the message we were looking for */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index a419669..ccda208 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -3585,7 +3585,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
FUNC_ENTER_PACKAGE
/* Get bounding box for the selection */
- HDmemset(bounds_end, 0, sizeof(bounds_end));
+ memset(bounds_end, 0, sizeof(bounds_end));
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
/* Get bounding box for the selection */
@@ -4302,7 +4302,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
if (!*space) {
/* Patch the rank of the allocated dataspace */
- HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
+ memset(dims, 0, (size_t)rank * sizeof(dims[0]));
if (H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions")
} /* end if */
@@ -5555,8 +5555,8 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
assert(ndims > 0);
/* Initialize arrays */
- HDmemset(offset, 0, sizeof(offset));
- HDmemset(rest_zeros, 0, sizeof(rest_zeros));
+ memset(offset, 0, sizeof(offset));
+ memset(rest_zeros, 0, sizeof(rest_zeros));
/* Check for an offset between the two selections */
span1 = span_info1->head;
@@ -6834,7 +6834,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
hsize_t block[H5S_MAX_RANK]; /* Block selected in base dataspace */
/* Compute the offset for the down-projection */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
for (u = 0; u < (base_space->extent.rank - new_space->extent.rank); u++)
block[u] = opt_diminfo[u].start;
*offset = H5VM_array_offset(base_space->extent.rank, base_space->extent.size, block);
@@ -6917,7 +6917,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
unsigned curr_dim; /* Current dimension being operated on */
/* Clear the block buffer */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
/* Advance down selected spans */
curr = base_space->select.sel_info.hslab->span_lst->head;
@@ -7152,7 +7152,7 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection")
/* Zero out the selection offset */
- HDmemset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank);
+ memset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank);
/* Indicate that the offset was normalized */
ret_value = TRUE;
@@ -11727,7 +11727,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Initialize udata */
/* We will use op_info[0] for nelem and op_info[1] for copied spans */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
udata.ds_span[0] = ds_span_info->head;
udata.ds_low[0] = udata.ds_span[0]->low;
udata.ss_rank = H5S_GET_EXTENT_NDIMS(src_space);
@@ -11955,7 +11955,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
/* Last block is partial, need to construct compound selection */
/* Fill start with zeros */
- HDmemset(start, 0, sizeof(start));
+ memset(start, 0, sizeof(start));
/* Set block to clip_size in unlimited dimension, H5S_MAX_SIZE in
* others so only unlimited dimension is clipped */
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 29a6502..f304743 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -429,7 +429,7 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ
MPI_Aint temp;
temp = disp[u];
- HDmemmove(disp + m + 1, disp + m, (u - m) * sizeof(MPI_Aint));
+ memmove(disp + m + 1, disp + m, (u - m) * sizeof(MPI_Aint));
disp[m] = temp;
} /* end if */
(*permute)[u] = m;
@@ -571,8 +571,8 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da
if ((*permute)[u] != num_points) {
MPI_Aint temp = disp[u];
- HDmemmove(disp + (*permute)[u] + 1, disp + (*permute)[u],
- (u - (*permute)[u]) * sizeof(MPI_Aint));
+ memmove(disp + (*permute)[u] + 1, disp + (*permute)[u],
+ (u - (*permute)[u]) * sizeof(MPI_Aint));
disp[(*permute)[u]] = temp;
} /* end if */
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index aafdcf7..50346ae 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -749,7 +749,7 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize
/* Set the bound box to the default value */
H5VM_array_fill(space->select.sel_info.pnt_lst->low_bounds, &tmp, sizeof(hsize_t),
space->extent.rank);
- HDmemset(space->select.sel_info.pnt_lst->high_bounds, 0, sizeof(hsize_t) * space->extent.rank);
+ memset(space->select.sel_info.pnt_lst->high_bounds, 0, sizeof(hsize_t) * space->extent.rank);
}
/* Add points to selection */
@@ -1051,7 +1051,7 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t *
FUNC_ENTER_PACKAGE
/* Get bounding box for the selection */
- HDmemset(bounds_end, 0, sizeof(bounds_end));
+ memset(bounds_end, 0, sizeof(bounds_end));
if (H5S__point_bounds(space, bounds_start, bounds_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds")
@@ -1403,7 +1403,7 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
if (!*space) {
/* Patch the rank of the allocated dataspace */
- (void)HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
+ (void)memset(dims, 0, (size_t)rank * sizeof(dims[0]));
if (H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions")
} /* end if */
@@ -2282,7 +2282,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
rank_diff = base_space->extent.rank - new_space->extent.rank;
/* Calculate offset of selection in projected buffer */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
H5MM_memcpy(block, base_space->select.sel_info.pnt_lst->head->pnt, sizeof(hsize_t) * rank_diff);
*offset = H5VM_array_offset(base_space->extent.rank, base_space->extent.size, block);
@@ -2338,7 +2338,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
new_node->next = NULL;
/* Copy over the point's coordinates */
- HDmemset(new_node->pnt, 0, sizeof(hsize_t) * rank_diff);
+ memset(new_node->pnt, 0, sizeof(hsize_t) * rank_diff);
H5MM_memcpy(&new_node->pnt[rank_diff], base_node->pnt,
(base_space->extent.rank * sizeof(hsize_t)));
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 071ff2c..1a06414 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -2227,7 +2227,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
*/
if (H5S_GET_EXTENT_TYPE(base_space) == H5S_SIMPLE && base_space->select.offset_changed) {
if (new_space_rank > base_space_rank) {
- HDmemset(new_space->select.offset, 0, sizeof(new_space->select.offset[0]) * rank_diff);
+ memset(new_space->select.offset, 0, sizeof(new_space->select.offset[0]) * rank_diff);
H5MM_memcpy(&new_space->select.offset[rank_diff], base_space->select.offset,
sizeof(new_space->select.offset[0]) * base_space_rank);
} /* end if */
@@ -2476,8 +2476,8 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Get source space bounds. Should be a single point. */
if (H5S_SELECT_BOUNDS(src_space, coords_start, coords_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get source space bounds")
- assert(0 == HDmemcmp(coords_start, coords_end,
- H5S_GET_EXTENT_NDIMS(src_space) * sizeof(coords_start[0])));
+ assert(0 == memcmp(coords_start, coords_end,
+ H5S_GET_EXTENT_NDIMS(src_space) * sizeof(coords_start[0])));
/* Check for intersection */
if ((intersect = H5S_SELECT_INTERSECT_BLOCK(src_intersect_space, coords_start, coords_end)) < 0)
diff --git a/src/H5T.c b/src/H5T.c
index 935e148..b8ab810 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -2526,7 +2526,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(tmp_did = H5I_register(H5I_DATATYPE, H5T_copy(old_path->dst, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"unable to register data types for conv query")
- HDmemset(&cdata, 0, sizeof cdata);
+ memset(&cdata, 0, sizeof cdata);
cdata.command = H5T_CONV_INIT;
if (conv->is_app) {
if ((conv->u.app_func)(tmp_sid, tmp_did, &cdata, (size_t)0, (size_t)0, (size_t)0, NULL, NULL,
@@ -2707,8 +2707,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
if (func && func != soft->conv.u.app_func)
continue;
- HDmemmove(H5T_g.soft + i, H5T_g.soft + i + 1,
- (size_t)(H5T_g.nsoft - (i + 1)) * sizeof(H5T_soft_t));
+ memmove(H5T_g.soft + i, H5T_g.soft + i + 1, (size_t)(H5T_g.nsoft - (i + 1)) * sizeof(H5T_soft_t));
--H5T_g.nsoft;
} /* end for */
} /* end if */
@@ -2733,8 +2732,8 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
} /* end if */
else {
/* Remove from table */
- HDmemmove(H5T_g.path + i, H5T_g.path + i + 1,
- (size_t)(H5T_g.npaths - (i + 1)) * sizeof(H5T_path_t *));
+ memmove(H5T_g.path + i, H5T_g.path + i + 1,
+ (size_t)(H5T_g.npaths - (i + 1)) * sizeof(H5T_path_t *));
--H5T_g.npaths;
/* Shut down path */
@@ -3534,7 +3533,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo
}
else {
/* Empty enum */
- HDmemset(&new_dt->shared->u.enumer, 0, sizeof(H5T_enum_t));
+ memset(&new_dt->shared->u.enumer, 0, sizeof(H5T_enum_t));
}
break;
@@ -4576,8 +4575,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
idx = u;
} /* end else */
- tmp = HDmemcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
- (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size, base_size);
+ tmp = memcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
+ (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size, base_size);
if (tmp < 0)
HGOTO_DONE(-1);
if (tmp > 0)
@@ -5023,14 +5022,14 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
if (H5T_g.soft[i].conv.is_app) {
if ((H5T_g.soft[i].conv.u.app_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
- HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
+ memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
} /* end if */
else if ((H5T_g.soft[i].conv.u.lib_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL) < 0) {
- HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
+ memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
@@ -5118,7 +5117,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
} /* end if */
if (cmp > 0)
md++;
- HDmemmove(H5T_g.path + md + 1, H5T_g.path + md, (size_t)(H5T_g.npaths - md) * sizeof(H5T_path_t *));
+ memmove(H5T_g.path + md + 1, H5T_g.path + md, (size_t)(H5T_g.npaths - md) * sizeof(H5T_path_t *));
H5T_g.npaths++;
H5T_g.path[md] = path;
table = path;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 3cfdfbc..de43eec 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2307,11 +2307,11 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
xbuf + src_memb->offset, xbkg + dst_memb->offset) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to convert compound datatype member")
- HDmemmove(xbuf + offset, xbuf + src_memb->offset, dst_memb->size);
+ memmove(xbuf + offset, xbuf + src_memb->offset, dst_memb->size);
offset += dst_memb->size;
} /* end if */
else {
- HDmemmove(xbuf + offset, xbuf + src_memb->offset, src_memb->size);
+ memmove(xbuf + offset, xbuf + src_memb->offset, src_memb->size);
offset += src_memb->size;
} /* end else */
} /* end for */
@@ -2341,7 +2341,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} /* end if */
else
offset -= dst_memb->size;
- HDmemmove(xbkg + dst_memb->offset, xbuf + offset, dst_memb->size);
+ memmove(xbkg + dst_memb->offset, xbuf + offset, dst_memb->size);
} /* end for */
assert(0 == offset);
@@ -2361,7 +2361,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* buffer.
*/
for (xbuf = buf, xbkg = bkg, elmtno = 0; elmtno < nelmts; elmtno++) {
- HDmemmove(xbuf, xbkg, dst->shared->size);
+ memmove(xbuf, xbkg, dst->shared->size);
xbuf += buf_stride ? buf_stride : dst->shared->size;
xbkg += bkg_delta;
} /* end for */
@@ -2552,7 +2552,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
copy_size = priv->subset_info.copy_size;
for (elmtno = 0; elmtno < nelmts; elmtno++) {
- HDmemmove(xbkg, xbuf, copy_size);
+ memmove(xbkg, xbuf, copy_size);
/* Update pointers */
xbuf += buf_stride;
@@ -2582,14 +2582,14 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to convert compound datatype member")
for (elmtno = 0; elmtno < nelmts; elmtno++) {
- HDmemmove(xbkg, xbuf, dst_memb->size);
+ memmove(xbkg, xbuf, dst_memb->size);
xbuf += buf_stride;
xbkg += bkg_stride;
} /* end for */
} /* end if */
else {
for (xbuf = buf, elmtno = 0; elmtno < nelmts; elmtno++) {
- HDmemmove(xbuf + offset, xbuf + src_memb->offset, src_memb->size);
+ memmove(xbuf + offset, xbuf + src_memb->offset, src_memb->size);
xbuf += buf_stride;
} /* end for */
offset += src_memb->size;
@@ -2619,7 +2619,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to convert compound datatype member")
for (elmtno = 0; elmtno < nelmts; elmtno++) {
- HDmemmove(xbkg, xbuf, dst_memb->size);
+ memmove(xbkg, xbuf, dst_memb->size);
xbuf += buf_stride;
xbkg += bkg_stride;
} /* end for */
@@ -2632,7 +2632,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
/* Move background buffer into result buffer */
for (xbuf = buf, xbkg = bkg, elmtno = 0; elmtno < nelmts; elmtno++) {
- HDmemmove(xbuf, xbkg, dst->shared->size);
+ memmove(xbuf, xbkg, dst->shared->size);
xbuf += buf_stride;
xbkg += bkg_stride;
} /* end for */
@@ -2915,7 +2915,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
cb_struct.user_data);
if (except_ret == H5T_CONV_UNHANDLED)
- HDmemset(d, 0xff, dst->shared->size);
+ memset(d, 0xff, dst->shared->size);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception")
@@ -2935,8 +2935,8 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
while (lt < rt) {
md = (lt + rt) / 2;
- cmp = HDmemcmp(s, (uint8_t *)src->shared->u.enumer.value + (md * src->shared->size),
- src->shared->size);
+ cmp = memcmp(s, (uint8_t *)src->shared->u.enumer.value + (md * src->shared->size),
+ src->shared->size);
if (cmp < 0)
rt = md;
else if (cmp > 0)
@@ -2952,7 +2952,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
cb_struct.user_data);
if (except_ret == H5T_CONV_UNHANDLED)
- HDmemset(d, 0xff, dst->shared->size);
+ memset(d, 0xff, dst->shared->size);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception")
@@ -3318,7 +3318,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
if (NULL == (conv_buf = H5FL_BLK_REALLOC(vlen_seq, conv_buf, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(conv_buf, 0, conv_buf_size);
+ memset(conv_buf, 0, conv_buf_size);
} /* end else-if */
/* Read in VL sequence */
@@ -3336,7 +3336,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
if (NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(tmp_buf, 0, tmp_buf_size);
+ memset(tmp_buf, 0, tmp_buf_size);
} /* end if */
/* If we are writing and there is a nested VL type, read
@@ -3358,7 +3358,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
(tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(tmp_buf, 0, tmp_buf_size);
+ memset(tmp_buf, 0, tmp_buf_size);
} /* end if */
/* Read in background VL sequence */
@@ -3370,8 +3370,8 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* If the sequence gets shorter, pad out the original sequence with zeros */
if (bg_seq_len < seq_len)
- HDmemset((uint8_t *)tmp_buf + dst_base_size * bg_seq_len, 0,
- (seq_len - bg_seq_len) * dst_base_size);
+ memset((uint8_t *)tmp_buf + dst_base_size * bg_seq_len, 0,
+ (seq_len - bg_seq_len) * dst_base_size);
} /* end if */
/* Convert VL sequence */
@@ -3562,7 +3562,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s
/* Perform the actual conversion */
for (elmtno = 0; elmtno < nelmts; elmtno++) {
/* Copy the source array into the correct location for the destination */
- HDmemmove(dp, sp, src->shared->size);
+ memmove(dp, sp, src->shared->size);
/* Convert array */
if (H5T_convert(tpath, tsrc_id, tdst_id, src->shared->u.array.nelem, (size_t)0, bkg_stride,
@@ -3752,7 +3752,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (NULL == (conv_buf = H5FL_BLK_REALLOC(ref_seq, conv_buf, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(conv_buf, 0, conv_buf_size);
+ memset(conv_buf, 0, conv_buf_size);
} /* end if */
if (dst_copy && (src->shared->u.atomic.u.r.loc == H5T_LOC_DISK))
@@ -8478,7 +8478,7 @@ next:
dp += direction * (ssize_t)dst_p->shared->size;
}
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
break;
@@ -8831,7 +8831,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*make destination infinity by setting exponent to maximal number and
*mantissa to zero.*/
expo = expo_max;
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
}
@@ -8901,7 +8901,7 @@ padding:
dp += direction * (ssize_t)dst_p->shared->size;
}
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
break;
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index 1e00ee1..fa083a6 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -173,8 +173,7 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
if (!HDstrcmp(dt->shared->u.enumer.name[i], name))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "name redefinition")
- if (!HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value,
- dt->shared->size))
+ if (!memcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value, dt->shared->size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "value redefinition")
}
@@ -363,8 +362,8 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t
rt = copied_dt->shared->u.enumer.nmembs;
while (lt < rt) {
md = (lt + rt) / 2;
- cmp = HDmemcmp(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size),
- copied_dt->shared->size);
+ cmp = memcmp(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size),
+ copied_dt->shared->size);
if (cmp < 0)
rt = md;
else if (cmp > 0)
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index 556e71c..fdeaac0 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -308,8 +308,8 @@ H5T__sort_value(const H5T_t *dt, int *map)
assert(size <= sizeof(tbuf));
for (i = (nmembs - 1), swapped = TRUE; i > 0 && swapped; --i) {
for (j = 0, swapped = FALSE; j < i; j++) {
- if (HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (j * size),
- (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
+ if (memcmp((uint8_t *)dt->shared->u.enumer.value + (j * size),
+ (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
/* Swap names */
char *tmp = dt->shared->u.enumer.name[j];
dt->shared->u.enumer.name[j] = dt->shared->u.enumer.name[j + 1];
@@ -336,8 +336,8 @@ H5T__sort_value(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < (nmembs - 1); i++)
- assert(HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * size),
- (uint8_t *)dt->shared->u.enumer.value + ((i + 1) * size), size) < 0);
+ assert(memcmp((uint8_t *)dt->shared->u.enumer.value + (i * size),
+ (uint8_t *)dt->shared->u.enumer.value + ((i + 1) * size), size) < 0);
#endif
} /* end if */
} /* end else */
diff --git a/src/H5Tref.c b/src/H5Tref.c
index aac3634..f0cdb29 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -303,7 +303,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get container info")
/* Retrieve min encode size (when references have no vlen part) */
- HDmemset(&fixed_ref, 0, sizeof(fixed_ref));
+ memset(&fixed_ref, 0, sizeof(fixed_ref));
fixed_ref.type = (int8_t)H5R_OBJECT2;
fixed_ref.token_size = (uint8_t)cont_info.token_size;
if (H5R__encode(NULL, &fixed_ref, NULL, &ref_encode_size, 0) < 0)
@@ -370,7 +370,7 @@ H5T__ref_mem_isnull(const H5VL_object_t H5_ATTR_UNUSED *src_file, const void *sr
assert(src_buf);
assert(isnull);
- *isnull = (0 == HDmemcmp(src_buf, zeros, H5T_REF_MEM_SIZE)) ? TRUE : FALSE;
+ *isnull = (0 == memcmp(src_buf, zeros, H5T_REF_MEM_SIZE)) ? TRUE : FALSE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__ref_mem_isnull() */
@@ -392,7 +392,7 @@ H5T__ref_mem_setnull(H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, H5_A
FUNC_ENTER_PACKAGE_NOERR
H5T_REF_LOG_DEBUG("");
- HDmemset(dst_buf, 0, H5T_REF_MEM_SIZE);
+ memset(dst_buf, 0, H5T_REF_MEM_SIZE);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__ref_mem_setnull() */
@@ -682,7 +682,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
/* Make sure reference buffer is correctly initialized */
- HDmemset(&tmp_ref, 0, sizeof(tmp_ref));
+ memset(&tmp_ref, 0, sizeof(tmp_ref));
switch (src_type) {
case H5R_OBJECT1: {
@@ -737,7 +737,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
} /* end if */
/* Set output info */
- HDmemcpy(dst_ref, &tmp_ref, sizeof(tmp_ref));
+ memcpy(dst_ref, &tmp_ref, sizeof(tmp_ref));
done:
if ((file_id != H5I_INVALID_HID) && (H5I_dec_ref(file_id) < 0))
@@ -840,7 +840,7 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf)
} /* end if */
/* Copy header manually so that it does not get encoded into the blob */
- HDmemset(q, 0, H5R_ENCODE_HEADER_SIZE);
+ memset(q, 0, H5R_ENCODE_HEADER_SIZE);
q += H5R_ENCODE_HEADER_SIZE;
/* Set the size */
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 1da9d6c..121f6b0 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -367,7 +367,7 @@ H5T__vlen_mem_seq_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
/* Copy to ensure correct alignment. memcpy is best here because
* it optimizes to fast code.
*/
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
*len = vl.len;
@@ -393,7 +393,7 @@ H5T__vlen_mem_seq_getptr(void *_vl)
/* check parameters, return result */
assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
FUNC_LEAVE_NOAPI(vl.p)
} /* end H5T__vlen_mem_seq_getptr() */
@@ -418,7 +418,7 @@ H5T__vlen_mem_seq_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hb
assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
*isnull = ((vl.len == 0 || vl.p == NULL) ? TRUE : FALSE);
@@ -474,7 +474,7 @@ H5T__vlen_mem_seq_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf,
assert(buf);
assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
assert(vl.p);
H5MM_memcpy(buf, vl.p, len);
@@ -553,7 +553,7 @@ H5T__vlen_mem_str_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
*len = HDstrlen(s);
@@ -579,7 +579,7 @@ H5T__vlen_mem_str_getptr(void *_vl)
/* check parameters */
assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
FUNC_LEAVE_NOAPI(s)
} /* end H5T__vlen_mem_str_getptr() */
@@ -601,7 +601,7 @@ H5T__vlen_mem_str_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hb
FUNC_ENTER_PACKAGE_NOERR
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
*isnull = (s == NULL ? TRUE : FALSE);
@@ -651,7 +651,7 @@ H5T__vlen_mem_str_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf,
assert(buf);
assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
H5MM_memcpy(buf, s, len);
} /* end if */
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 289f37a..5535f25 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -496,7 +496,7 @@ H5VL_cmp_connector_info(const H5VL_class_t *connector, int *cmp_value, const voi
} /* end if */
else {
assert(connector->info_cls.size > 0);
- *cmp_value = HDmemcmp(info1, info2, connector->info_cls.size);
+ *cmp_value = memcmp(info1, info2, connector->info_cls.size);
} /* end else */
done:
@@ -7662,7 +7662,7 @@ H5VL__token_cmp(void *obj, const H5VL_class_t *cls, const H5O_token_t *token1, c
HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare object tokens")
} /* end if */
else
- *cmp_value = HDmemcmp(token1, token2, sizeof(H5O_token_t));
+ *cmp_value = memcmp(token1, token2, sizeof(H5O_token_t));
} /* end else */
done:
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 2ee8d16..d6a8666 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -441,7 +441,7 @@ H5VL_native_addr_to_token(void *obj, H5I_type_t obj_type, haddr_t addr, H5O_toke
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "couldn't get length of haddr_t from VOL object")
/* Ensure that token is initialized */
- HDmemset(token, 0, sizeof(H5O_token_t));
+ memset(token, 0, sizeof(H5O_token_t));
/* Encode token */
p = (uint8_t *)token;
diff --git a/src/H5VLnative_group.c b/src/H5VLnative_group.c
index 0cc22f8..163e03f 100644
--- a/src/H5VLnative_group.c
+++ b/src/H5VLnative_group.c
@@ -90,7 +90,7 @@ H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const
/* Set up group creation info */
gcrt_info.gcpl_id = gcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Create the new group & get its ID */
if (NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info)))
diff --git a/src/H5VLnative_token.c b/src/H5VLnative_token.c
index 4091c1d..78d0350 100644
--- a/src/H5VLnative_token.c
+++ b/src/H5VLnative_token.c
@@ -73,7 +73,7 @@ H5VL__native_token_cmp(void H5_ATTR_UNUSED *obj, const H5O_token_t *token1, cons
assert(token1);
assert(token2);
- *cmp_value = HDmemcmp(token1, token2, sizeof(H5O_token_t));
+ *cmp_value = memcmp(token1, token2, sizeof(H5O_token_t));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__native_token_cmp() */
diff --git a/src/H5VM.c b/src/H5VM.c
index ec3886d..6e0ea81 100644
--- a/src/H5VM.c
+++ b/src/H5VM.c
@@ -580,7 +580,7 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
for (i = 0; i < nelmts; i++) {
/* Copy an element */
H5_CHECK_OVERFLOW(elmt_size, hsize_t, size_t);
- HDmemset(dst, (int)fill_value, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
+ memset(dst, (int)fill_value, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
/* Decrement indices and advance pointer */
for (j = (int)(n - 1), carry = TRUE; j >= 0 && carry; --j) {
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index a81ef0d..903635c 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -40,10 +40,10 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
if (SRC) \
H5MM_memcpy(DST, SRC, (N) * sizeof(*(DST))); \
else \
- HDmemset(DST, 0, (N) * sizeof(*(DST))); \
+ memset(DST, 0, (N) * sizeof(*(DST))); \
} while (0)
-#define H5VM_vector_zero(N, DST) HDmemset(DST, 0, (N) * sizeof(*(DST)))
+#define H5VM_vector_zero(N, DST) memset(DST, 0, (N) * sizeof(*(DST)))
/* Given a coordinate offset array (COORDS) of type TYPE, move the unlimited
* dimension (UNLIM_DIM) value to offset 0, sliding any intermediate values down
@@ -57,7 +57,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
if (0 != (UNLIM_DIM)) { \
TYPE _tmp = (COORDS)[UNLIM_DIM]; \
\
- HDmemmove(&(COORDS)[1], &(COORDS)[0], sizeof(TYPE) * (UNLIM_DIM)); \
+ memmove(&(COORDS)[1], &(COORDS)[0], sizeof(TYPE) * (UNLIM_DIM)); \
(COORDS)[0] = _tmp; \
} /* end if */ \
} while (0)
@@ -75,7 +75,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
if (0 != (UNLIM_DIM)) { \
TYPE _tmp = (COORDS)[0]; \
\
- HDmemmove(&(COORDS)[0], &(COORDS)[1], sizeof(TYPE) * (UNLIM_DIM)); \
+ memmove(&(COORDS)[0], &(COORDS)[1], sizeof(TYPE) * (UNLIM_DIM)); \
(COORDS)[UNLIM_DIM] = _tmp; \
} /* end if */ \
} while (0)
diff --git a/src/H5WB.c b/src/H5WB.c
index 3232305..5754084 100644
--- a/src/H5WB.c
+++ b/src/H5WB.c
@@ -216,7 +216,7 @@ H5WB_actual_clear(H5WB_t *wb, size_t need)
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear the buffer */
- HDmemset(ret_value, 0, need);
+ memset(ret_value, 0, need);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Z.c b/src/H5Z.c
index 0907e32..b7a75f6 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -325,7 +325,7 @@ H5Z_register(const H5Z_class2_t *cls)
i = H5Z_table_used_g++;
H5MM_memcpy(H5Z_table_g + i, cls, sizeof(H5Z_class2_t));
#ifdef H5Z_DEBUG
- HDmemset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t));
+ memset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t));
#endif /* H5Z_DEBUG */
} /* end if */
/* Filter already registered */
@@ -428,11 +428,11 @@ H5Z__unregister(H5Z_filter_t filter_id)
/* Remove filter from table */
/* Don't worry about shrinking table size (for now) */
- HDmemmove(&H5Z_table_g[filter_index], &H5Z_table_g[filter_index + 1],
- sizeof(H5Z_class2_t) * ((H5Z_table_used_g - 1) - filter_index));
+ memmove(&H5Z_table_g[filter_index], &H5Z_table_g[filter_index + 1],
+ sizeof(H5Z_class2_t) * ((H5Z_table_used_g - 1) - filter_index));
#ifdef H5Z_DEBUG
- HDmemmove(&H5Z_stat_table_g[filter_index], &H5Z_stat_table_g[filter_index + 1],
- sizeof(H5Z_stats_t) * ((H5Z_table_used_g - 1) - filter_index));
+ memmove(&H5Z_stat_table_g[filter_index], &H5Z_stat_table_g[filter_index + 1],
+ sizeof(H5Z_stats_t) * ((H5Z_table_used_g - 1) - filter_index));
#endif /* H5Z_DEBUG */
H5Z_table_used_g--;
@@ -1636,7 +1636,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
pline->nused--;
/* Reset information for previous last filter in pipeline */
- HDmemset(&pline->filter[pline->nused], 0, sizeof(H5Z_filter_info_t));
+ memset(&pline->filter[pline->nused], 0, sizeof(H5Z_filter_info_t));
} /* end else */
done:
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index 414f03f..dccdf2c 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -84,7 +84,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for deflate uncompression")
/* Set the uncompression parameters */
- HDmemset(&z_strm, 0, sizeof(z_strm));
+ memset(&z_strm, 0, sizeof(z_strm));
z_strm.next_in = (Bytef *)*buf;
H5_CHECKED_ASSIGN(z_strm.avail_in, unsigned, nbytes, size_t);
z_strm.next_out = (Bytef *)outbuf;
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 40c7f84..a157933 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -1258,7 +1258,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff
FUNC_ENTER_PACKAGE
/* may not have to initialize to zeros */
- HDmemset(data, 0, d_nelmts * (size_t)parms[4]);
+ memset(data, 0, d_nelmts * (size_t)parms[4]);
/* initialization before the loop */
j = 0;
@@ -1528,7 +1528,7 @@ H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer
unsigned parms_index; /* index in array parms used by compression/decompression functions */
/* must initialize buffer to be zeros */
- HDmemset(buffer, 0, *buffer_size);
+ memset(buffer, 0, *buffer_size);
/* initialization before the loop */
buf_len = sizeof(unsigned char) * 8;
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 91ed5cd..e605672 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -947,7 +947,7 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Initialize the parameters to a known state */
- HDmemset(cd_values, 0, sizeof(cd_values));
+ memset(cd_values, 0, sizeof(cd_values));
/* Get the filter's current parameters */
if (H5P_get_filter_by_id(dcpl_plist, H5Z_FILTER_SCALEOFFSET, &flags, &cd_nelmts, cd_values, (size_t)0,
@@ -1334,7 +1334,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
/* (Looks like an error in the original determination of how many
* bytes would be needed for parameters. - QAK, 2010/08/19)
*/
- HDmemset(outbuf + 13, 0, (size_t)8);
+ memset(outbuf + 13, 0, (size_t)8);
/* special case: minbits equal to full precision */
if (minbits == p.size * 8) {
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 5890036..64b8b05 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -1037,8 +1037,8 @@ H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
/* check args */
assert(tree);
- HDmemset(&resl, 0, sizeof(H5Z_result));
- HDmemset(&resr, 0, sizeof(H5Z_result));
+ memset(&resl, 0, sizeof(H5Z_result));
+ memset(&resr, 0, sizeof(H5Z_result));
if (tree->type == H5Z_XFORM_INTEGER) {
res->type = H5Z_XFORM_INTEGER;
diff --git a/src/H5encode.h b/src/H5encode.h
index 1dd7abe..a9172ff 100644
--- a/src/H5encode.h
+++ b/src/H5encode.h
@@ -128,7 +128,7 @@
\
HDcompile_assert(sizeof(double) == 8); \
HDcompile_assert(sizeof(double) == sizeof(uint64_t)); \
- HDmemcpy(&_n, &n, sizeof(double)); \
+ memcpy(&_n, &n, sizeof(double)); \
for (_u = 0; _u < sizeof(uint64_t); _u++, _n >>= 8) \
*_p++ = (uint8_t)(_n & 0xff); \
(p) = (uint8_t *)(p) + 8; \
@@ -245,7 +245,7 @@
(p) += 8; \
for (_u = 0; _u < sizeof(uint64_t); _u++) \
_n = (_n << 8) | *(--p); \
- HDmemcpy(&(n), &_n, sizeof(double)); \
+ memcpy(&(n), &_n, sizeof(double)); \
(p) += 8; \
} while (0)
diff --git a/src/H5mpi.c b/src/H5mpi.c
index 51a6f2f..4a4287d 100644
--- a/src/H5mpi.c
+++ b/src/H5mpi.c
@@ -391,9 +391,9 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
same = TRUE;
/* Memset the buffers to zero */
- HDmemset(key, 0, MPI_MAX_INFO_KEY);
- HDmemset(value1, 0, MPI_MAX_INFO_VAL);
- HDmemset(value2, 0, MPI_MAX_INFO_VAL);
+ memset(key, 0, MPI_MAX_INFO_KEY);
+ memset(value1, 0, MPI_MAX_INFO_VAL);
+ memset(value2, 0, MPI_MAX_INFO_VAL);
/* Get the nth key */
if (MPI_SUCCESS != (mpi_code = MPI_Info_get_nthkey(info1, i, key)))
@@ -406,7 +406,7 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
HMPI_GOTO_ERROR(FAIL, "MPI_Info_get failed", mpi_code)
/* Compare values and flags */
- if (!flag1 || !flag2 || HDmemcmp(value1, value2, MPI_MAX_INFO_VAL)) {
+ if (!flag1 || !flag2 || memcmp(value1, value2, MPI_MAX_INFO_VAL)) {
same = FALSE;
break;
}
diff --git a/src/H5private.h b/src/H5private.h
index a062ae7..71f32da 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -835,18 +835,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDlstat
#define HDlstat(S, B) lstat(S, B)
#endif
-#ifndef HDmemcmp
-#define HDmemcmp(X, Y, Z) memcmp(X, Y, Z)
-#endif
-#ifndef HDmemcpy
-#define HDmemcpy(X, Y, Z) memcpy(X, Y, Z)
-#endif
-#ifndef HDmemmove
-#define HDmemmove(X, Y, Z) memmove((char *)(X), (const char *)(Y), Z)
-#endif
-#ifndef HDmemset
-#define HDmemset(X, C, Z) memset(X, C, Z)
-#endif
#ifndef HDmkdir
#define HDmkdir(S, M) mkdir(S, M)
#endif
diff --git a/src/H5timer.c b/src/H5timer.c
index eb80af5..c0a945b 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -359,7 +359,7 @@ H5_timer_init(H5_timer_t *timer /*in,out*/)
assert(timer);
/* Initialize everything */
- HDmemset(timer, 0, sizeof(H5_timer_t));
+ memset(timer, 0, sizeof(H5_timer_t));
return 0;
} /* end H5_timer_init() */