diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-29 19:33:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 19:33:46 (GMT) |
commit | 39e6bf48c92dda00057e2e19cdeed93f5a07b3c8 (patch) | |
tree | 7596e876fd008f38830d04591d49a0328208b0d1 /tools | |
parent | fd933f30b1f8cd487ad790ac0b054bb779280a62 (diff) | |
download | hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.zip hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.gz hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.bz2 |
Remove HD from HDmem* calls (#3211)
Diffstat (limited to 'tools')
35 files changed, 296 insertions, 296 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 442fb3e..502b2ec 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -112,7 +112,7 @@ print_incoming_data(void) do { MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &incomingMessage, &Status); if (incomingMessage) { - HDmemset(data, 0, PRINT_DATA_MAX_SIZE + 1); + memset(data, 0, PRINT_DATA_MAX_SIZE + 1); MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &Status); @@ -494,7 +494,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata) H5TOOLS_START_DEBUG(" "); /* init linkinfo struct */ - HDmemset(&lnk_info, 0, sizeof(h5tool_link_info_t)); + memset(&lnk_info, 0, sizeof(h5tool_link_info_t)); if (!opts->follow_links) { trav_info_visit_lnk(path, linfo, tinfo); @@ -628,10 +628,10 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char H5TOOLS_START_DEBUG(" "); /* init filenames */ - HDmemset(filenames, 0, MAX_FILENAME * 2); + memset(filenames, 0, MAX_FILENAME * 2); /* init link info struct */ - HDmemset(&trg_linfo1, 0, sizeof(h5tool_link_info_t)); - HDmemset(&trg_linfo2, 0, sizeof(h5tool_link_info_t)); + memset(&trg_linfo1, 0, sizeof(h5tool_link_info_t)); + memset(&trg_linfo2, 0, sizeof(h5tool_link_info_t)); /*------------------------------------------------------------------------- * check invalid combination of options @@ -776,7 +776,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char obj1type = (h5trav_type_t)oinfo1.type; trav_info_add(info1_obj, obj1fullname, obj1type); idx = info1_obj->nused - 1; - HDmemcpy(&info1_obj->paths[idx].obj_token, &oinfo1.token, sizeof(H5O_token_t)); + memcpy(&info1_obj->paths[idx].obj_token, &oinfo1.token, sizeof(H5O_token_t)); info1_obj->paths[idx].fileno = oinfo1.fileno; } else if (src_linfo1.type == H5L_TYPE_SOFT) { @@ -826,7 +826,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char obj2type = (h5trav_type_t)oinfo2.type; trav_info_add(info2_obj, obj2fullname, obj2type); idx = info2_obj->nused - 1; - HDmemcpy(&info2_obj->paths[idx].obj_token, &oinfo2.token, sizeof(H5O_token_t)); + memcpy(&info2_obj->paths[idx].obj_token, &oinfo2.token, sizeof(H5O_token_t)); info2_obj->paths[idx].fileno = oinfo2.fileno; } else if (src_linfo2.type == H5L_TYPE_SOFT) { @@ -896,7 +896,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char size_t idx = info1_lp->nused - 1; H5TOOLS_DEBUG("h5diff ... ... ... info1_obj not null"); - HDmemcpy(&info1_lp->paths[idx].obj_token, &trg_linfo1.obj_token, sizeof(H5O_token_t)); + memcpy(&info1_lp->paths[idx].obj_token, &trg_linfo1.obj_token, sizeof(H5O_token_t)); info1_lp->paths[idx].type = (h5trav_type_t)trg_linfo1.trg_type; info1_lp->paths[idx].fileno = trg_linfo1.fileno; } @@ -936,7 +936,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char size_t idx = info2_lp->nused - 1; H5TOOLS_DEBUG("h5diff ... ... ... info2_obj not null"); - HDmemcpy(&info2_lp->paths[idx].obj_token, &trg_linfo2.obj_token, sizeof(H5O_token_t)); + memcpy(&info2_lp->paths[idx].obj_token, &trg_linfo2.obj_token, sizeof(H5O_token_t)); info2_lp->paths[idx].type = (h5trav_type_t)trg_linfo2.trg_type; info2_lp->paths[idx].fileno = trg_linfo2.fileno; } @@ -1173,7 +1173,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, MPI_Status Status; /*set all tasks as free */ - HDmemset(workerTasks, 1, (size_t)(g_nTasks - 1) * sizeof(char)); + memset(workerTasks, 1, (size_t)(g_nTasks - 1) * sizeof(char)); #endif for (i = 0; i < table->nobjs; i++) { @@ -1472,7 +1472,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, } /* end else-if */ else if (Status.MPI_TAG == MPI_TAG_PRINT_DATA) { char data[PRINT_DATA_MAX_SIZE + 1]; - HDmemset(data, 0, PRINT_DATA_MAX_SIZE + 1); + memset(data, 0, PRINT_DATA_MAX_SIZE + 1); MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD, &Status); @@ -1548,8 +1548,8 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_ H5TOOLS_START_DEBUG(" - errstat:%d", opts->err_stat); /*init link info struct */ - HDmemset(&linkinfo1, 0, sizeof(h5tool_link_info_t)); - HDmemset(&linkinfo2, 0, sizeof(h5tool_link_info_t)); + memset(&linkinfo1, 0, sizeof(h5tool_link_info_t)); + memset(&linkinfo2, 0, sizeof(h5tool_link_info_t)); /* pass how to handle printing warnings to linkinfo option */ if (print_warn(opts)) @@ -1833,7 +1833,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_ if (linkinfo1.linfo.type == H5L_TYPE_EXTERNAL && linkinfo2.linfo.type == H5L_TYPE_EXTERNAL) { /* If the buffers are the same size, compare them */ if (linkinfo1.linfo.u.val_size == linkinfo2.linfo.u.val_size) { - status = HDmemcmp(linkinfo1.trg_path, linkinfo2.trg_path, linkinfo1.linfo.u.val_size); + status = memcmp(linkinfo1.trg_path, linkinfo2.trg_path, linkinfo1.linfo.u.val_size); } else status = 1; diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 37c17e5..edb0190 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -212,7 +212,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_ * by the condition, but it gives more clarity for code planning */ if (type_class != H5T_REFERENCE && type_class != H5T_COMPOUND && type_class != H5T_STRING && - type_class != H5T_VLEN && HDmemcmp(mem1, mem2, size * opts->hs_nelmts) == 0) { + type_class != H5T_VLEN && memcmp(mem1, mem2, size * opts->hs_nelmts) == 0) { H5TOOLS_ENDDEBUG(":Fast comparison - errstat:%d", opts->err_stat); return 0; } @@ -381,7 +381,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_ case H5T_VLEN: case H5T_REFERENCE: H5TOOLS_DEBUG("type_class:OTHER"); - HDmemset(&members, 0, sizeof(mcomp_t)); + memset(&members, 0, sizeof(mcomp_t)); get_member_types(opts->m_tid, &members); for (i = 0; i < opts->hs_nelmts; i++) { H5TOOLS_DEBUG("opts->pos[%" PRIuHSIZE "]:%" PRIuHSIZE " - nelmts:%" PRIuHSIZE, i, @@ -460,7 +460,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co * by the condition, but it gives more clarity for code planning */ if (type_class != H5T_REFERENCE && type_class != H5T_COMPOUND && type_class != H5T_STRING && - type_class != H5T_VLEN && HDmemcmp(mem1, mem2, type_size) == 0) + type_class != H5T_VLEN && memcmp(mem1, mem2, type_size) == 0) H5TOOLS_GOTO_DONE(opts->err_stat); switch (H5Tget_class(opts->m_tid)) { @@ -590,7 +590,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co /* check for NULL pointer for string */ if (s != NULL) { /* try fast compare first */ - if ((HDmemcmp(s, sx, size) == 0) && (size1 != size2)) { + if ((memcmp(s, sx, size) == 0) && (size1 != size2)) { for (u = size; u < sizex; u++) character_compare(s + u, sx + u, elemtno, u, opts); } @@ -1556,8 +1556,8 @@ character_compare(char *mem1, char *mem2, hsize_t elemtno, size_t u, diff_opt_t char temp1_uchar; char temp2_uchar; - HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); - HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); + memcpy(&temp1_uchar, mem1, sizeof(unsigned char)); + memcpy(&temp2_uchar, mem2, sizeof(unsigned char)); H5TOOLS_START_DEBUG(" %d=%d", temp1_uchar, temp2_uchar); if (temp1_uchar != temp2_uchar) { @@ -1598,8 +1598,8 @@ character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno, /* both_zero is set in the PER_UNSIGN macro but not used in this function */ (void)both_zero; - HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); - HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); + memcpy(&temp1_uchar, mem1, sizeof(unsigned char)); + memcpy(&temp2_uchar, mem2, sizeof(unsigned char)); H5TOOLS_START_DEBUG(" %d=%d", temp1_uchar, temp2_uchar); /* -d and !-p */ @@ -1673,8 +1673,8 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_float, mem1, sizeof(float)); - HDmemcpy(&temp2_float, mem2, sizeof(float)); + memcpy(&temp1_float, mem1, sizeof(float)); + memcpy(&temp2_float, mem2, sizeof(float)); /* logic for detecting NaNs is different with opts -d, -p and no opts */ @@ -1853,8 +1853,8 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_double, mem1, sizeof(double)); - HDmemcpy(&temp2_double, mem2, sizeof(double)); + memcpy(&temp1_double, mem1, sizeof(double)); + memcpy(&temp2_double, mem2, sizeof(double)); /*------------------------------------------------------------------------- * -d and !-p @@ -2026,8 +2026,8 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_double, mem1, sizeof(long double)); - HDmemcpy(&temp2_double, mem2, sizeof(long double)); + memcpy(&temp1_double, mem1, sizeof(long double)); + memcpy(&temp2_double, mem2, sizeof(long double)); /* logic for detecting NaNs is different with options -d, -p and no options */ @@ -2196,8 +2196,8 @@ diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d hbool_t both_zero = FALSE; H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_char, mem1, sizeof(char)); - HDmemcpy(&temp2_char, mem2, sizeof(char)); + memcpy(&temp1_char, mem1, sizeof(char)); + memcpy(&temp2_char, mem2, sizeof(char)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { @@ -2285,8 +2285,8 @@ diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char)); - HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char)); + memcpy(&temp1_uchar, mem1, sizeof(unsigned char)); + memcpy(&temp2_uchar, mem2, sizeof(unsigned char)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { if (PDIFF(temp1_uchar, temp2_uchar) > opts->delta) { @@ -2373,8 +2373,8 @@ diff_short_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_short, mem1, sizeof(short)); - HDmemcpy(&temp2_short, mem2, sizeof(short)); + memcpy(&temp1_short, mem1, sizeof(short)); + memcpy(&temp2_short, mem2, sizeof(short)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { if (ABS(temp1_short - temp2_short) > opts->delta) { @@ -2461,8 +2461,8 @@ diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_ushort, mem1, sizeof(unsigned short)); - HDmemcpy(&temp2_ushort, mem2, sizeof(unsigned short)); + memcpy(&temp1_ushort, mem1, sizeof(unsigned short)); + memcpy(&temp2_ushort, mem2, sizeof(unsigned short)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { if (PDIFF(temp1_ushort, temp2_ushort) > opts->delta) { @@ -2553,8 +2553,8 @@ diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, dif H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_int, mem1, sizeof(int)); - HDmemcpy(&temp2_int, mem2, sizeof(int)); + memcpy(&temp1_int, mem1, sizeof(int)); + memcpy(&temp2_int, mem2, sizeof(int)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { if (ABS(temp1_int - temp2_int) > opts->delta) { @@ -2641,8 +2641,8 @@ diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_uint, mem1, sizeof(unsigned int)); - HDmemcpy(&temp2_uint, mem2, sizeof(unsigned int)); + memcpy(&temp1_uint, mem1, sizeof(unsigned int)); + memcpy(&temp2_uint, mem2, sizeof(unsigned int)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { if (PDIFF(temp1_uint, temp2_uint) > opts->delta) { @@ -2729,8 +2729,8 @@ diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_long, mem1, sizeof(long)); - HDmemcpy(&temp2_long, mem2, sizeof(long)); + memcpy(&temp1_long, mem1, sizeof(long)); + memcpy(&temp2_long, mem2, sizeof(long)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { if (ABS(temp1_long - temp2_long) > (long)opts->delta) { @@ -2817,8 +2817,8 @@ diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_ulong, mem1, sizeof(unsigned long)); - HDmemcpy(&temp2_ulong, mem2, sizeof(unsigned long)); + memcpy(&temp1_ulong, mem1, sizeof(unsigned long)); + memcpy(&temp2_ulong, mem2, sizeof(unsigned long)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { if (PDIFF(temp1_ulong, temp2_ulong) > (unsigned long)opts->delta) { @@ -2907,8 +2907,8 @@ diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_llong, mem1, sizeof(long long)); - HDmemcpy(&temp2_llong, mem2, sizeof(long long)); + memcpy(&temp1_llong, mem1, sizeof(long long)); + memcpy(&temp2_llong, mem2, sizeof(long long)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { @@ -3001,8 +3001,8 @@ diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool); - HDmemcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); - HDmemcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); + memcpy(&temp1_ullong, mem1, sizeof(unsigned long long)); + memcpy(&temp2_ullong, mem2, sizeof(unsigned long long)); /* -d and !-p */ if (opts->delta_bool && !opts->percent_bool) { @@ -3104,13 +3104,13 @@ ull2float(unsigned long long ull_value, float *f_value) if ((buf = (unsigned char *)calloc((size_t)1, MAX(src_size, dst_size))) == NULL) H5TOOLS_GOTO_ERROR(FAIL, "Could not allocate buffer for dims"); - HDmemcpy(buf, &ull_value, src_size); + memcpy(buf, &ull_value, src_size); /* do conversion */ if (H5Tconvert(H5T_NATIVE_ULLONG, H5T_NATIVE_FLOAT, (size_t)1, buf, NULL, dxpl_id) < 0) H5TOOLS_GOTO_ERROR(FAIL, "H5Tconvert failed"); - HDmemcpy(f_value, buf, dst_size); + memcpy(f_value, buf, dst_size); done: H5E_BEGIN_TRY @@ -3165,7 +3165,7 @@ equal_double(double value, double expected, diff_opt_t *opts) } else { /* Check bits */ - if (!HDmemcmp(&value, &expected, sizeof(double))) + if (!memcmp(&value, &expected, sizeof(double))) return TRUE; } @@ -3212,7 +3212,7 @@ equal_ldouble(long double value, long double expected, diff_opt_t *opts) } else { /* Check bits */ - if (!HDmemcmp(&value, &expected, sizeof(long double))) + if (!memcmp(&value, &expected, sizeof(long double))) return TRUE; } @@ -3258,7 +3258,7 @@ equal_float(float value, float expected, diff_opt_t *opts) } else { /* Check bits */ - if (!HDmemcmp(&value, &expected, sizeof(float))) + if (!memcmp(&value, &expected, sizeof(float))) return TRUE; } @@ -3501,7 +3501,7 @@ get_member_types(hid_t tid, mcomp_t *members) members->ids[u] = H5Tget_member_type(tid, u); members->offsets[u] = H5Tget_member_offset(tid, u); members->m[u] = (mcomp_t *)malloc(sizeof(mcomp_t)); - HDmemset(members->m[u], 0, sizeof(mcomp_t)); + memset(members->m[u], 0, sizeof(mcomp_t)); get_member_types(members->ids[u], members->m[u]); } } diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index c0c5ba1..78f52bc 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -532,17 +532,17 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n } /* the stripmine loop */ - HDmemset(hs_offset1, 0, sizeof hs_offset1); - HDmemset(hs_stride1, 0, sizeof hs_stride1); - HDmemset(hs_count1, 0, sizeof hs_count1); - HDmemset(hs_block1, 0, sizeof hs_block1); - HDmemset(hs_size1, 0, sizeof hs_size1); - HDmemset(hs_offset2, 0, sizeof hs_offset2); - HDmemset(hs_stride2, 0, sizeof hs_stride2); - HDmemset(hs_count2, 0, sizeof hs_count2); - HDmemset(hs_block2, 0, sizeof hs_block2); - HDmemset(hs_size2, 0, sizeof hs_size2); - HDmemset(zero, 0, sizeof zero); + memset(hs_offset1, 0, sizeof hs_offset1); + memset(hs_stride1, 0, sizeof hs_stride1); + memset(hs_count1, 0, sizeof hs_count1); + memset(hs_block1, 0, sizeof hs_block1); + memset(hs_size1, 0, sizeof hs_size1); + memset(hs_offset2, 0, sizeof hs_offset2); + memset(hs_stride2, 0, sizeof hs_stride2); + memset(hs_count2, 0, sizeof hs_count2); + memset(hs_block2, 0, sizeof hs_block2); + memset(hs_size2, 0, sizeof hs_size2); + memset(zero, 0, sizeof zero); /* if subsetting was requested - initialize the subsetting variables */ H5TOOLS_DEBUG("compare by hyperslabs: opts->nelmts=%ld - opts->m_size=%ld", opts->nelmts, diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 30edd5f..5beffa4 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1229,8 +1229,8 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context H5TOOLS_START_DEBUG(" "); - HDmemset(&prefix, 0, sizeof(h5tools_str_t)); - HDmemset(&str, 0, sizeof(h5tools_str_t)); + memset(&prefix, 0, sizeof(h5tools_str_t)); + memset(&str, 0, sizeof(h5tools_str_t)); /* Terminate previous line, if any */ H5TOOLS_DEBUG("before CR elmtno=%ld, ctx->cur_column=%d, info->idx_fmt=%s, info->line_suf=%s", elmtno, @@ -1324,8 +1324,8 @@ h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_ if (!ctx->need_prefix) return; - HDmemset(&prefix, 0, sizeof(h5tools_str_t)); - HDmemset(&str, 0, sizeof(h5tools_str_t)); + memset(&prefix, 0, sizeof(h5tools_str_t)); + memset(&str, 0, sizeof(h5tools_str_t)); /* Terminate previous line, if any */ if (ctx->cur_column) { @@ -1842,7 +1842,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t s = (char *)mem; } for (i = 0; i < size && (s[i] || pad != H5T_STR_NULLTERM); i++) { - HDmemcpy(&tempuchar, &s[i], sizeof(unsigned char)); + memcpy(&tempuchar, &s[i], sizeof(unsigned char)); if (1 != fwrite(&tempuchar, sizeof(unsigned char), 1, stream)) H5TOOLS_THROW((-1), "fwrite failed"); } /* i */ @@ -1946,11 +1946,11 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t if (size > sizeof(tref)) H5TOOLS_THROW((-1), "unexpectedly large ref"); - HDmemset(&tref, 0, sizeof(tref)); + memset(&tref, 0, sizeof(tref)); for (block_index = 0; block_index < block_nelmts; block_index++) { mem = ((unsigned char *)_mem) + block_index * size; - HDmemcpy(&tref, mem, size); + memcpy(&tref, mem, size); if ((region_id = H5Ropen_object(&tref, H5P_DEFAULT, H5P_DEFAULT)) < 0) H5TOOLS_INFO("H5Ropen_object H5T_STD_REF failed"); else { diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 4840def..d869907 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -264,7 +264,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont } /* end if */ else { /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); size = H5Tget_size(type); H5TOOLS_DEBUG("type size is %ld", size); @@ -500,7 +500,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for assert(buffer); assert(ptdata); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); H5TOOLS_START_DEBUG(" "); @@ -899,7 +899,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre H5TOOLS_START_DEBUG(" "); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); /* Allocate space for the dimension array */ if ((dims1 = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL) H5TOOLS_THROW((-1), "Could not allocate buffer for dims"); @@ -1702,8 +1702,8 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont H5TOOLS_DEBUG("ctx->ndims:%d", ctx->ndims); /* The stripmine loop */ - HDmemset(hs_offset, 0, sizeof hs_offset); - HDmemset(zero, 0, sizeof zero); + memset(hs_offset, 0, sizeof hs_offset); + memset(zero, 0, sizeof zero); for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_nelmts) { H5TOOLS_DEBUG("stripmine read loop:%d", i); @@ -1901,7 +1901,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t * stream = rawoutstream; if (!info) { - HDmemset(&info_dflt, 0, sizeof info_dflt); + memset(&info_dflt, 0, sizeof info_dflt); info = &info_dflt; } @@ -1977,7 +1977,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c stream = rawoutstream; if (!info) { - HDmemset(&info_dflt, 0, sizeof(info_dflt)); + memset(&info_dflt, 0, sizeof(info_dflt)); info = &info_dflt; } @@ -2812,13 +2812,13 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i else if (H5T_SGN_NONE == H5Tget_sign(native)) { unsigned long long copy; - HDmemcpy(©, value + i * dst_size, sizeof(copy)); + memcpy(©, value + i * dst_size, sizeof(copy)); h5tools_str_append(buffer, "%llu", copy); } else { long long copy; - HDmemcpy(©, value + i * dst_size, sizeof(copy)); + memcpy(©, value + i * dst_size, sizeof(copy)); h5tools_str_append(buffer, "%lld", copy); } @@ -2871,7 +2871,7 @@ h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, h5tools_context */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; @@ -2917,7 +2917,7 @@ h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info, h5tools_contex */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; @@ -2964,7 +2964,7 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; @@ -3122,7 +3122,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * h5tools_str_t buffer; /* string into which to render */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; @@ -3765,7 +3765,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_ return; /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; @@ -3817,7 +3817,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; @@ -3959,7 +3959,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool size_t ncols = 80; /* available output width */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; @@ -4054,7 +4054,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex /* Assume entire data space to be printed */ datactx.need_prefix = TRUE; - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); for (i = 0; i < ndims; i++, datactx.cur_elmt++, elmt_counter++) { H5O_type_t obj_type = -1; /* Object type */ H5R_type_t ref_type; /* Reference type */ @@ -4287,7 +4287,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t * H5TOOLS_START_DEBUG(" file=%p", (void *)stream); H5TOOLS_DEBUG("rawdata file=%p", (void *)rawdatastream); /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); if (info->line_ncols > 0) ncols = info->line_ncols; diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index e7858c8..d89c546 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -108,7 +108,7 @@ ref_path_table_cmp(const void *key1, const void *key2) if (thefile > 0) H5Otoken_cmp(thefile, token1, token2, &cmp_value); else - cmp_value = HDmemcmp(token1, token2, sizeof(H5O_token_t)); + cmp_value = memcmp(token1, token2, sizeof(H5O_token_t)); return cmp_value; } @@ -201,7 +201,7 @@ ref_path_table_lookup(const char *thepath, H5O_token_t *token) return -1; /* Return object token through parameter */ - HDmemcpy(token, &oi.token, sizeof(H5O_token_t)); + memcpy(token, &oi.token, sizeof(H5O_token_t)); return 0; } @@ -230,7 +230,7 @@ ref_path_table_put(const char *path, const H5O_token_t *token) if ((new_node = (ref_path_node_t *)malloc(sizeof(ref_path_node_t))) == NULL) return (-1); - HDmemcpy(&new_node->obj_token, token, sizeof(H5O_token_t)); + memcpy(&new_node->obj_token, token, sizeof(H5O_token_t)); new_node->path = HDstrdup(path); return (H5SL_insert(ref_path_table, new_node, &(new_node->obj_token))); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index d927820..5ae6838 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -63,7 +63,7 @@ h5tools_str_close(h5tools_str_t *str) { if (str && str->nalloc) { free(str->s); - HDmemset(str, 0, sizeof(h5tools_str_t)); + memset(str, 0, sizeof(h5tools_str_t)); } } @@ -704,21 +704,21 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai /* if (H5Tequal(type, H5T_NATIVE_FLOAT)) */ float tempfloat; - HDmemcpy(&tempfloat, vp, sizeof(float)); + memcpy(&tempfloat, vp, sizeof(float)); h5tools_str_append(str, OPT(info->fmt_float, "%g"), (double)tempfloat); } else if (sizeof(double) == nsize) { /* if (H5Tequal(type, H5T_NATIVE_DOUBLE)) */ double tempdouble; - HDmemcpy(&tempdouble, vp, sizeof(double)); + memcpy(&tempdouble, vp, sizeof(double)); h5tools_str_append(str, OPT(info->fmt_double, "%g"), tempdouble); } else if (sizeof(long double) == nsize) { /* if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) */ long double templdouble; - HDmemcpy(&templdouble, vp, sizeof(long double)); + memcpy(&templdouble, vp, sizeof(long double)); h5tools_str_append(str, "%Lg", templdouble); } else { @@ -818,7 +818,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai else if (H5T_SGN_NONE == nsign) { unsigned char tempuchar; - HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char)); + memcpy(&tempuchar, ucp_vp, sizeof(unsigned char)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(unsigned char)) tempuchar = 0; @@ -832,7 +832,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai else { signed char tempchar; - HDmemcpy(&tempchar, cp_vp, sizeof(char)); + memcpy(&tempchar, cp_vp, sizeof(char)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(char)) tempchar = 0; @@ -848,7 +848,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai if (H5T_SGN_NONE == nsign) { unsigned int tempuint; - HDmemcpy(&tempuint, vp, sizeof(unsigned int)); + memcpy(&tempuint, vp, sizeof(unsigned int)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(unsigned int)) tempuint = 0; @@ -860,7 +860,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai else { int tempint; - HDmemcpy(&tempint, vp, sizeof(int)); + memcpy(&tempint, vp, sizeof(int)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(int)) tempint = 0; @@ -875,7 +875,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai if (H5T_SGN_NONE == nsign) { unsigned short tempushort; - HDmemcpy(&tempushort, vp, sizeof(unsigned short)); + memcpy(&tempushort, vp, sizeof(unsigned short)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(unsigned short)) tempushort = 0; @@ -889,7 +889,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai else { short tempshort; - HDmemcpy(&tempshort, vp, sizeof(short)); + memcpy(&tempshort, vp, sizeof(short)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(short)) tempshort = 0; @@ -904,7 +904,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai if (H5T_SGN_NONE == nsign) { unsigned long tempulong; - HDmemcpy(&tempulong, vp, sizeof(unsigned long)); + memcpy(&tempulong, vp, sizeof(unsigned long)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(unsigned long)) tempulong = 0; @@ -916,7 +916,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai else { long templong; - HDmemcpy(&templong, vp, sizeof(long)); + memcpy(&templong, vp, sizeof(long)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(long)) templong = 0; @@ -932,7 +932,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai if (H5T_SGN_NONE == nsign) { unsigned long long tempullong; - HDmemcpy(&tempullong, vp, sizeof(unsigned long long)); + memcpy(&tempullong, vp, sizeof(unsigned long long)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(unsigned long long)) tempullong = 0; @@ -944,7 +944,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai else { long long templlong; - HDmemcpy(&templlong, vp, sizeof(long long)); + memcpy(&templlong, vp, sizeof(long long)); if (packed_bits_num) { if (packed_data_offset >= 8 * sizeof(long long)) templlong = 0; @@ -1544,10 +1544,10 @@ h5tools_escape(char *s /*in,out*/, size_t size) /*would overflow*/ return NULL; - HDmemmove(s + i + esc_size, s + i + 1, n - i); /*make room*/ - HDmemcpy(s + i, escape, esc_size); /*insert*/ - n += esc_size - 1; /* adjust total string size */ - i += esc_size; /* adjust string position */ + memmove(s + i + esc_size, s + i + 1, n - i); /*make room*/ + memcpy(s + i, escape, esc_size); /*insert*/ + n += esc_size - 1; /* adjust total string size */ + i += esc_size; /* adjust string position */ } } @@ -1609,11 +1609,11 @@ h5tools_str_replace(const char *string, const char *substr, const char *replacem free(oldstr); return NULL; } - HDmemcpy(newstr, oldstr, (size_t)(tok - oldstr)); - HDmemcpy(newstr + (tok - oldstr), replacement, HDstrlen(replacement)); - HDmemcpy(newstr + (tok - oldstr) + HDstrlen(replacement), tok + HDstrlen(substr), - HDstrlen(oldstr) - HDstrlen(substr) - (size_t)(tok - oldstr)); - HDmemset(newstr + HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement), 0, 1); + memcpy(newstr, oldstr, (size_t)(tok - oldstr)); + memcpy(newstr + (tok - oldstr), replacement, HDstrlen(replacement)); + memcpy(newstr + (tok - oldstr) + HDstrlen(replacement), tok + HDstrlen(substr), + HDstrlen(oldstr) - HDstrlen(substr) - (size_t)(tok - oldstr)); + memset(newstr + HDstrlen(oldstr) - HDstrlen(substr) + HDstrlen(replacement), 0, 1); /* move back head right after the last replacement */ head = newstr + (tok - oldstr) + HDstrlen(replacement); free(oldstr); diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 37a9568..baff559 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -784,7 +784,7 @@ add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, hbool u = table->nobjs++; /* Set information about object */ - HDmemcpy(&table->objs[u].obj_token, obj_token, sizeof(H5O_token_t)); + memcpy(&table->objs[u].obj_token, obj_token, sizeof(H5O_token_t)); table->objs[u].objname = HDstrdup(objname); table->objs[u].recorded = record; table->objs[u].displayed = 0; @@ -927,7 +927,7 @@ H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t } /* end if */ /* set target obj type to return */ - HDmemcpy(&link_info->obj_token, &trg_oinfo.token, sizeof(H5O_token_t)); + memcpy(&link_info->obj_token, &trg_oinfo.token, sizeof(H5O_token_t)); link_info->trg_type = trg_oinfo.type; link_info->fileno = trg_oinfo.fileno; } /* end if */ @@ -1180,7 +1180,7 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values) ret_value = 0; goto done; } - HDmemcpy(fa->aws_region, values[0], (HDstrlen(values[0]) + 1)); + memcpy(fa->aws_region, values[0], (HDstrlen(values[0]) + 1)); if (show_progress) { printf(" aws_region set\n"); } @@ -1192,7 +1192,7 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values) ret_value = 0; goto done; } - HDmemcpy(fa->secret_id, values[1], (HDstrlen(values[1]) + 1)); + memcpy(fa->secret_id, values[1], (HDstrlen(values[1]) + 1)); if (show_progress) { printf(" secret_id set\n"); } @@ -1204,7 +1204,7 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_t *fa, const char **values) ret_value = 0; goto done; } - HDmemcpy(fa->secret_key, values[2], (HDstrlen(values[2]) + 1)); + memcpy(fa->secret_key, values[2], (HDstrlen(values[2]) + 1)); if (show_progress) { printf(" secret_key set\n"); } diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 060a33b..5ae379e 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -125,7 +125,7 @@ trav_token_add(trav_addr_t *visited, H5O_token_t *token, const char *path) /* Append it */ idx = visited->nused++; - HDmemcpy(&visited->objs[idx].token, token, sizeof(H5O_token_t)); + memcpy(&visited->objs[idx].token, token, sizeof(H5O_token_t)); visited->objs[idx].path = HDstrdup(path); } /* end trav_token_add() */ @@ -354,7 +354,7 @@ trav_fileinfo_add(trav_info_t *info, hid_t loc_id) else H5Oget_info3(loc_id, &oinfo, H5O_INFO_BASIC); - HDmemcpy(&info->paths[idx].obj_token, &oinfo.token, sizeof(H5O_token_t)); + memcpy(&info->paths[idx].obj_token, &oinfo.token, sizeof(H5O_token_t)); info->paths[idx].fileno = oinfo.fileno; } /* end trav_fileinfo_add() */ @@ -381,7 +381,7 @@ trav_info_visit_obj(const char *path, const H5O_info2_t *oinfo, const char H5_AT /* set object addr and fileno. These are for checking same object */ info_p = (trav_info_t *)udata; idx = info_p->nused - 1; - HDmemcpy(&info_p->paths[idx].obj_token, &oinfo->token, sizeof(H5O_token_t)); + memcpy(&info_p->paths[idx].obj_token, &oinfo->token, sizeof(H5O_token_t)); info_p->paths[idx].fileno = oinfo->fileno; return (0); @@ -658,7 +658,7 @@ trav_table_add(trav_table_t *table, const char *path, const H5O_info2_t *oinfo) new_obj = table->nobjs++; if (oinfo) - HDmemcpy(&table->objs[new_obj].obj_token, &oinfo->token, sizeof(H5O_token_t)); + memcpy(&table->objs[new_obj].obj_token, &oinfo->token, sizeof(H5O_token_t)); else /* Set token to 'undefined' values */ table->objs[new_obj].obj_token = H5O_TOKEN_UNDEF; diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index c2fd41a..2b28df3 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -217,7 +217,7 @@ main(int argc, char *argv[]) h5tools_init(); /* init linkinfo struct */ - HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t)); + memset(&linkinfo, 0, sizeof(h5tool_link_info_t)); /* Check for no command line parameters */ if (argc == 1) { diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 0e34bc4..4854534 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -122,7 +122,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const H5TOOLS_START_DEBUG(" "); /* process the command-line */ - HDmemset(opts, 0, sizeof(diff_opt_t)); + memset(opts, 0, sizeof(diff_opt_t)); /* assume equal contents initially */ opts->contents = 1; diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index 807add3..efac3cb 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -181,7 +181,7 @@ ph5diff_worker(int nID) char out_data[PRINT_DATA_MAX_SIZE]; int tmp; - HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE); + memset(out_data, 0, PRINT_DATA_MAX_SIZE); i = 0; rewind(overflow_file); @@ -191,7 +191,7 @@ ph5diff_worker(int nID) MPI_Send(out_data, PRINT_DATA_MAX_SIZE, MPI_BYTE, 0, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD); i = 0; - HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE); + memset(out_data, 0, PRINT_DATA_MAX_SIZE); } } @@ -204,7 +204,7 @@ ph5diff_worker(int nID) } fflush(stdout); - HDmemset(outBuff, 0, OUTBUFF_SIZE); + memset(outBuff, 0, OUTBUFF_SIZE); outBuffOffset = 0; MPI_Send(&diffs, sizeof(diffs), MPI_BYTE, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD); @@ -253,7 +253,7 @@ print_manager_output(void) } fflush(stdout); - HDmemset(outBuff, 0, OUTBUFF_SIZE); + memset(outBuff, 0, OUTBUFF_SIZE); outBuffOffset = 0; } else if ((outBuffOffset > 0) && !g_Parallel) { diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 31671b0..db13a83 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -595,7 +595,7 @@ parse_mask_list(const char *h_list) /* sanity check */ if (h_list) { - HDmemset(packed_mask, 0, sizeof(packed_mask)); + memset(packed_mask, 0, sizeof(packed_mask)); packed_bits_num = 0; /* scan in pair of offset,length separated by commas. */ diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index c15bd26..da9093c 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -48,7 +48,7 @@ dump_datatype(hid_t type) h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &h5tools_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -72,7 +72,7 @@ dump_dataspace(hid_t space) h5tools_context_t ctx; /* print context */ h5tool_format_t *outputformat = &h5tools_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -99,7 +99,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED * hid_t attr_id; herr_t ret = SUCCEED; - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; ctx.display_index = dump_opts.display_ai; @@ -163,9 +163,9 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT hsize_t curr_pos = 0; /* total data element position */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -634,9 +634,9 @@ dump_named_datatype(hid_t tid, const char *name) h5tool_format_t string_dataformat; /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -790,9 +790,9 @@ dump_group(hid_t gid, const char *name) } /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -925,7 +925,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset) h5tools_str_t buffer; /* string into which to render */ hsize_t curr_pos = 0; /* total data element position */ - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -958,7 +958,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset) } /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); ctx.need_prefix = TRUE; h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0); @@ -1112,7 +1112,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index) string_dataformat.do_escape = dump_opts.display_escape; outputformat = &string_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; ctx.sset = sset; @@ -1344,7 +1344,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a else { size_t buffer_space = w - 1; - HDmemset(obj_name, '\0', w); + memset(obj_name, '\0', w); if (op_name[0] != '/') { HDstrncat(obj_name, buf, buffer_space); buffer_space -= MIN(buffer_space, u); @@ -1554,7 +1554,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5 } /* end else */ dump_indent += COL; - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; ctx.display_index = dump_opts.display_ai; @@ -1582,7 +1582,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5 /* handle error case: cannot open the object with the attribute */ if ((oid = H5Oopen(fid, obj_name, H5P_DEFAULT)) < 0) { /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); ctx.need_prefix = TRUE; diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index 4ead4c0..cb279e3 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -140,9 +140,9 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5 hsize_t curr_pos = 0; /* total data element position */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -873,9 +873,9 @@ xml_print_datatype(hid_t type, unsigned in_group) hsize_t curr_pos = 0; /* total data element position */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -1570,9 +1570,9 @@ xml_dump_datatype(hid_t type) hsize_t curr_pos = 0; /* total data element position */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -1704,9 +1704,9 @@ xml_dump_dataspace(hid_t space) H5S_class_t space_type = H5Sget_simple_extent_type(space); /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -1875,13 +1875,13 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, h5tool_format_t *outputformat = &xml_dataformat; h5tool_format_t string_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; /* Print all the values. */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); string_dataformat = *outputformat; @@ -1935,7 +1935,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, status = xml_print_strs(obj_id, DATASET_DATA); else { h5tools_context_t datactx; - HDmemset(&datactx, 0, sizeof(datactx)); + memset(&datactx, 0, sizeof(datactx)); datactx.need_prefix = TRUE; datactx.indent_level = ctx.indent_level; datactx.cur_column = ctx.cur_column; @@ -1965,7 +1965,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, } else { h5tools_context_t datactx; - HDmemset(&datactx, 0, sizeof(datactx)); + memset(&datactx, 0, sizeof(datactx)); datactx.need_prefix = TRUE; datactx.indent_level = ctx.indent_level; datactx.cur_column = ctx.cur_column; @@ -2044,9 +2044,9 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED char *t_aname = xml_escape_the_name(attr_name); /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -2375,9 +2375,9 @@ xml_dump_named_datatype(hid_t type, const char *name) HDstrcat(tmp, name); /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -2594,9 +2594,9 @@ xml_dump_group(hid_t gid, const char *name) } /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -2998,9 +2998,9 @@ xml_print_refs(hid_t did, int source) refbuf = (H5R_ref_t *)((void *)buf); /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -3154,9 +3154,9 @@ xml_print_strs(hid_t did, int source) } /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -3269,9 +3269,9 @@ check_filters(hid_t dcpl) hsize_t curr_pos = 0; /* total data element position */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -3410,9 +3410,9 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) hsize_t curr_pos = 0; /* total data element position */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -3787,9 +3787,9 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss HDstrcat(tmp, name); /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -4378,9 +4378,9 @@ xml_print_enum(hid_t type) hsize_t curr_pos = 0; /* total data element position */ /* setup */ - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&buffer, 0, sizeof(h5tools_str_t)); - HDmemset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx)); ctx.indent_level = dump_indent / COL; ctx.cur_column = dump_indent; @@ -4514,13 +4514,13 @@ xml_print_enum(hid_t type) else if (H5T_SGN_NONE == H5Tget_sign(native)) { unsigned long long copy; - HDmemcpy(©, value + i * dst_size, sizeof(copy)); + memcpy(©, value + i * dst_size, sizeof(copy)); h5tools_str_append(&buffer, "%llu", copy); } else { long long copy; - HDmemcpy(©, value + i * dst_size, sizeof(copy)); + memcpy(©, value + i * dst_size, sizeof(copy)); h5tools_str_append(&buffer, "%lld", copy); } h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 7388075..ed81210 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -957,13 +957,13 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind) else if (H5T_SGN_NONE == H5Tget_sign(native)) { unsigned long long copy; - HDmemcpy(©, value + i * dst_size, sizeof(copy)); + memcpy(©, value + i * dst_size, sizeof(copy)); h5tools_str_append(buffer, "%llu", copy); } else { long long copy; - HDmemcpy(©, value + i * dst_size, sizeof(copy)); + memcpy(©, value + i * dst_size, sizeof(copy)); h5tools_str_append(buffer, "%lld", copy); } } @@ -1324,8 +1324,8 @@ dump_dataset_values(hid_t dset) f_type = H5Dget_type(dset); space = H5Dget_space(dset); - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); outputformat = *info; outputformat.line_1st = NULL; @@ -1493,8 +1493,8 @@ dump_attribute_values(hid_t attr) f_type = H5Aget_type(attr); space = H5Aget_space(attr); - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); outputformat = *info; outputformat.line_1st = NULL; @@ -1666,8 +1666,8 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain H5TOOLS_START_DEBUG(" "); - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); ctx.indent_level = 2; ctx.cur_column = (size_t)curr_pos; @@ -1772,8 +1772,8 @@ dataset_list1(hid_t dset) h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); h5tools_str_reset(&buffer); @@ -1844,8 +1844,8 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); h5tools_str_reset(&buffer); @@ -2051,8 +2051,8 @@ datatype_list2(hid_t type, const char H5_ATTR_UNUSED *name) h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); h5tools_str_reset(&buffer); @@ -2088,8 +2088,8 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi H5TOOLS_START_DEBUG(" "); - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); h5tools_str_reset(&buffer); @@ -2266,13 +2266,13 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter) h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); h5tools_str_reset(&buffer); /* init linkinfo struct */ - HDmemset(&lnk_info, 0, sizeof(h5tool_link_info_t)); + memset(&lnk_info, 0, sizeof(h5tool_link_info_t)); /* if verbose, make H5tools_get_symlink_info() display more */ if (verbose_g) @@ -2452,8 +2452,8 @@ visit_obj(hid_t file, const char *oname, iter_t *iter) h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); h5tools_str_reset(&buffer); @@ -2684,8 +2684,8 @@ main(int argc, char *argv[]) h5tools_init(); /* Initialize fapl info structs */ - HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t)); - HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t)); + memset(&vol_info, 0, sizeof(h5tools_vol_info_t)); + memset(&vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* Build object display table */ DISPATCH(H5O_TYPE_GROUP, "Group", NULL, NULL); @@ -3095,8 +3095,8 @@ main(int argc, char *argv[]) h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - HDmemset(&ctx, 0, sizeof(ctx)); - HDmemset(&buffer, 0, sizeof(h5tools_str_t)); + memset(&ctx, 0, sizeof(ctx)); + memset(&buffer, 0, sizeof(h5tools_str_t)); h5tools_str_reset(&buffer); print_obj_name(&buffer, &iter, oname, "**NOT FOUND**"); diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index 34101af..9b2c1c2 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -385,7 +385,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si if (!base_name || !fullname || size < 1) return NULL; - HDmemset(fullname, 0, size); + memset(fullname, 0, size); switch (iot) { case POSIXIO: @@ -594,7 +594,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby /* Prepare buffer for verifying data */ if (parms->verify) - HDmemset(buffer, pio_mpi_rank_g + 1, buf_size * blk_size); + memset(buffer, pio_mpi_rank_g + 1, buf_size * blk_size); } /* end else */ /* Calculate the total number of bytes (bytes_count) to be diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c index 295b580..76a9be5 100644 --- a/tools/src/h5perf/pio_perf.c +++ b/tools/src/h5perf/pio_perf.c @@ -1275,7 +1275,7 @@ parse_command_line(int argc, const char *const *argv) char buf[10]; int i; - HDmemset(buf, '\0', sizeof(buf)); + memset(buf, '\0', sizeof(buf)); for (i = 0; *end != '\0' && *end != ','; ++end) if (isalnum(*end) && i < 10) @@ -1328,7 +1328,7 @@ parse_command_line(int argc, const char *const *argv) char buf[10]; int i; - HDmemset(buf, '\0', sizeof(buf)); + memset(buf, '\0', sizeof(buf)); for (i = 0; *end != '\0' && *end != ','; ++end) if (HDisalnum(*end) && i < 10) diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c index 3979cca..849238f 100644 --- a/tools/src/h5perf/sio_engine.c +++ b/tools/src/h5perf/sio_engine.c @@ -1148,10 +1148,10 @@ set_vfd(parameters *param) char arr[H5FD_MEM_NTYPES][1024]; } *sv = NULL; - HDmemset(memb_map, 0, sizeof memb_map); - HDmemset(memb_fapl, 0, sizeof memb_fapl); - HDmemset(memb_name, 0, sizeof memb_name); - HDmemset(memb_addr, 0, sizeof memb_addr); + memset(memb_map, 0, sizeof memb_map); + memset(memb_fapl, 0, sizeof memb_fapl); + memset(memb_name, 0, sizeof memb_name); + memset(memb_addr, 0, sizeof memb_addr); assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c index 6fd3760..0a3850e 100644 --- a/tools/src/h5perf/sio_perf.c +++ b/tools/src/h5perf/sio_perf.c @@ -849,7 +849,7 @@ parse_command_line(int argc, const char *const *argv) while (end && *end != '\0') { char buf[10]; - HDmemset(buf, '\0', sizeof(buf)); + memset(buf, '\0', sizeof(buf)); for (i = 0; *end != '\0' && *end != ','; ++end) if (HDisalnum(*end) && i < 10) @@ -889,7 +889,7 @@ parse_command_line(int argc, const char *const *argv) while (end && *end != '\0') { char buf[10]; - HDmemset(buf, '\0', sizeof(buf)); + memset(buf, '\0', sizeof(buf)); for (i = 0; *end != '\0' && *end != ','; ++end) if (HDisalnum(*end) && i < 10) @@ -915,7 +915,7 @@ parse_command_line(int argc, const char *const *argv) while (end && *end != '\0') { char buf[10]; - HDmemset(buf, '\0', sizeof(buf)); + memset(buf, '\0', sizeof(buf)); for (i = 0; *end != '\0' && *end != ','; ++end) if (HDisalnum(*end) && i < 10) @@ -972,7 +972,7 @@ parse_command_line(int argc, const char *const *argv) while (end && *end != '\0') { char buf[10]; - HDmemset(buf, '\0', sizeof(buf)); + memset(buf, '\0', sizeof(buf)); for (i = 0; *end != '\0' && *end != ','; ++end) if (HDisalnum(*end) && i < 10) @@ -1041,7 +1041,7 @@ parse_command_line(int argc, const char *const *argv) while (end && *end != '\0') { char buf[10]; - HDmemset(buf, '\0', sizeof(buf)); + memset(buf, '\0', sizeof(buf)); for (i = 0; *end != '\0' && *end != ','; ++end) if (HDisalnum(*end) && i < 10) @@ -1068,7 +1068,7 @@ parse_command_line(int argc, const char *const *argv) while (end && *end != '\0') { char buf[10]; - HDmemset(buf, '\0', sizeof(buf)); + memset(buf, '\0', sizeof(buf)); for (i = 0; *end != '\0' && *end != ','; ++end) if (HDisalnum(*end) && i < 10) diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index a6d83ea..7849e29 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -71,7 +71,7 @@ h5repack_init(pack_opt_t *options, int verbose, hbool_t latest) { int k, n; - HDmemset(options, 0, sizeof(pack_opt_t)); + memset(options, 0, sizeof(pack_opt_t)); options->min_comp = 0; options->verbose = verbose; options->latest = latest; @@ -259,7 +259,7 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t *named_dt_head_p = dt; /* Update the token/address and id */ - HDmemcpy(&dt->obj_token, &travt->objs[i].obj_token, sizeof(H5O_token_t)); + memcpy(&dt->obj_token, &travt->objs[i].obj_token, sizeof(H5O_token_t)); dt->id_out = H5I_INVALID_HID; /* Check if this type is the one requested */ @@ -282,7 +282,7 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t *named_dt_head_p = dt_ret; /* Update the token/address and id */ - HDmemcpy(&dt_ret->obj_token, &oinfo.token, sizeof(H5O_token_t)); + memcpy(&dt_ret->obj_token, &oinfo.token, sizeof(H5O_token_t)); dt_ret->id_out = H5I_INVALID_HID; } /* end if requested datatype not found */ @@ -854,7 +854,7 @@ check_objects(const char *fname, pack_opt_t *options) H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed"); if ((rank = H5Sget_simple_extent_ndims(sid)) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_ndims failed"); - HDmemset(dims, 0, sizeof dims); + memset(dims, 0, sizeof dims); if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_dims failed"); for (j = 0; j < rank; j++) diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index be3fddf..0f270c5 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -658,7 +658,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti int ret_value = 0; /* init linkinfo struct */ - HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t)); + memset(&linkinfo, 0, sizeof(h5tool_link_info_t)); /*------------------------------------------------------------------------- * copy the supplied object list @@ -877,7 +877,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti H5TOOLS_GOTO_ERROR((-1), "H5Dget_create_plist failed"); if ((rank = H5Sget_simple_extent_ndims(f_space_id)) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_ndims failed"); - HDmemset(dims, 0, sizeof dims); + memset(dims, 0, sizeof dims); if (H5Sget_simple_extent_dims(f_space_id, dims, NULL) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_dims failed"); if (H5Dget_space_status(dset_in, &space_status) < 0) @@ -1116,8 +1116,8 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti hslab_space = H5Screate_simple(1, &hslab_nelmts, NULL); /* the hyperslab selection loop */ - HDmemset(hs_sel_offset, 0, sizeof hs_sel_offset); - HDmemset(zero, 0, sizeof zero); + memset(hs_sel_offset, 0, sizeof hs_sel_offset); + memset(zero, 0, sizeof zero); for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_select_nelmts) { if (rank > 0) { diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index c0a245a..33e3b83 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -535,10 +535,10 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) int ret_value = 0; /* Initialize fapl info structs */ - HDmemset(&in_vol_info, 0, sizeof(h5tools_vol_info_t)); - HDmemset(&out_vol_info, 0, sizeof(h5tools_vol_info_t)); - HDmemset(&in_vfd_info, 0, sizeof(h5tools_vfd_info_t)); - HDmemset(&out_vfd_info, 0, sizeof(h5tools_vfd_info_t)); + memset(&in_vol_info, 0, sizeof(h5tools_vol_info_t)); + memset(&out_vol_info, 0, sizeof(h5tools_vol_info_t)); + memset(&in_vfd_info, 0, sizeof(h5tools_vfd_info_t)); + memset(&out_vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* parse command line options */ while (EOF != (opt = H5_get_option(argc, argv, s_opts, l_opts))) { @@ -966,7 +966,7 @@ main(int argc, char **argv) pack_opt_t options; /*the global options */ int parse_ret; - HDmemset(&options, 0, sizeof(pack_opt_t)); + memset(&options, 0, sizeof(pack_opt_t)); /* Initialize h5tools lib */ h5tools_init(); diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c index 5954a01..3d6f829 100644 --- a/tools/src/h5repack/h5repack_parse.c +++ b/tools/src/h5repack/h5repack_parse.c @@ -52,7 +52,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t unsigned pixels_per_block; /* initialize compression info */ - HDmemset(filt, 0, sizeof(filter_info_t)); + memset(filt, 0, sizeof(filter_info_t)); *is_glb = 0; /* check for the end of object list and number of objects */ @@ -95,7 +95,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t sobj[k + 1] = '\0'; HDstrcpy(obj_list[n].obj, sobj); - HDmemset(sobj, 0, sizeof(sobj)); + memset(sobj, 0, sizeof(sobj)); n++; k = -1; } @@ -492,9 +492,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about char sdim[10]; char slayout[10]; - HDmemset(sdim, '\0', sizeof(sdim)); - HDmemset(sobj, '\0', sizeof(sobj)); - HDmemset(slayout, '\0', sizeof(slayout)); + memset(sdim, '\0', sizeof(sdim)); + memset(sobj, '\0', sizeof(sobj)); + memset(slayout, '\0', sizeof(slayout)); /* check for the end of object list and number of objects */ for (i = 0, n = 0; i < len; i++) { @@ -528,7 +528,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about else sobj[k + 1] = '\0'; HDstrcpy(obj_list[n].obj, sobj); - HDmemset(sobj, 0, sizeof(sobj)); + memset(sobj, 0, sizeof(sobj)); n++; k = -1; } diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 222447d..ce4a5cf 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -666,7 +666,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) / for (j = 0; j < ((hvl_t *)buf)[i].len; j++) { if (update_ref_value(attr_id, H5R_OBJECT, &(ptr[j]), fidout, &ref_out, travt) < 0) continue; - HDmemcpy(&(ptr[j]), &ref_out, msize); + memcpy(&(ptr[j]), &ref_out, msize); } } /* for (i=0; i<nelems; i++) */ } @@ -680,7 +680,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) / if (update_ref_value(attr_id, H5R_DATASET_REGION, &(ptr[j]), fidout, &ref_out, travt) < 0) continue; - HDmemcpy(&(ptr[j]), &ref_out, msize); + memcpy(&(ptr[j]), &ref_out, msize); } } /* for (i=0; i<nelems; i++) */ } @@ -711,7 +711,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) / travt) < 0) /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */ continue; - HDmemcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]); + memcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]); } /* if */ else if (ref_comp_size[j] == H5R_DSET_REG_REF_BUF_SIZE) { size_t idx = i * msize + H5Tget_member_offset(mtype_id, ref_comp_index[j]); @@ -721,7 +721,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) / (hdset_reg_ref_t *)(((char *)buf) + idx), fidout, &ref_out, travt) < 0) continue; - HDmemcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]); + memcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]); } /* else if */ } /* j */ } /* i */ diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index 9a60cd8..f9ca18a 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -1606,7 +1606,7 @@ main(int argc, char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - HDmemset(&iter, 0, sizeof(iter)); + memset(&iter, 0, sizeof(iter)); if (parse_command_line(argc, (const char *const *)argv, &hand) < 0) goto done; diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index 3edf93c..fa93244 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -310,7 +310,7 @@ main(int argc, char *argv[]) addr = (haddr_t)strtoll(argv[2], NULL, 0); /* Extra arguments for primary data structure */ - HDmemset(extra, 0, sizeof(extra)); + memset(extra, 0, sizeof(extra)); if (argc > 3) { /* Number of extra arguments */ extra_count = argc - 3; @@ -335,25 +335,25 @@ main(int argc, char *argv[]) exit_value = 3; goto done; } - if (!HDmemcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) { + if (!memcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) { /* * Debug the file's super block. */ status = H5F_debug(f, stdout, 0, VCOL); } - else if (!HDmemcmp(sig, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a local heap. */ status = H5HL_debug(f, addr, stdout, 0, VCOL); } - else if (!HDmemcmp(sig, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a global heap collection. */ status = H5HG_debug(f, addr, stdout, 0, VCOL); } - else if (!HDmemcmp(sig, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a symbol table node. */ @@ -368,7 +368,7 @@ main(int argc, char *argv[]) status = H5G_node_debug(f, addr, stdout, 0, VCOL, extra[0]); } - else if (!HDmemcmp(sig, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a B-tree. B-trees are debugged through the B-tree * subclass. The subclass identifier is the byte immediately @@ -447,7 +447,7 @@ main(int argc, char *argv[]) goto done; } } - else if (!HDmemcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a v2 B-tree header. */ @@ -465,7 +465,7 @@ main(int argc, char *argv[]) status = H5B2__hdr_debug(f, addr, stdout, 0, VCOL, cls, (haddr_t)extra[0]); } - else if (!HDmemcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a v2 B-tree internal node. */ @@ -501,7 +501,7 @@ main(int argc, char *argv[]) status = H5B2__int_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1], (unsigned)extra[2], (haddr_t)extra[3]); } - else if (!HDmemcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a v2 B-tree leaf node. */ @@ -535,13 +535,13 @@ main(int argc, char *argv[]) status = H5B2__leaf_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1], (haddr_t)extra[2]); } - else if (!HDmemcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a fractal heap header. */ status = H5HF_hdr_debug(f, addr, stdout, 0, VCOL); } - else if (!HDmemcmp(sig, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a fractal heap direct block. */ @@ -560,7 +560,7 @@ main(int argc, char *argv[]) status = H5HF_dblock_debug(f, addr, stdout, 0, VCOL, extra[0], (size_t)extra[1]); } - else if (!HDmemcmp(sig, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a fractal heap indirect block. */ @@ -578,14 +578,14 @@ main(int argc, char *argv[]) status = H5HF_iblock_debug(f, addr, stdout, 0, VCOL, extra[0], (unsigned)extra[1]); } - else if (!HDmemcmp(sig, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a free space header. */ status = H5FS_debug(f, addr, stdout, 0, VCOL); } - else if (!HDmemcmp(sig, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug free space serialized sections. */ @@ -603,14 +603,14 @@ main(int argc, char *argv[]) status = H5FS_sects_debug(f, addr, stdout, 0, VCOL, extra[0], extra[1]); } - else if (!HDmemcmp(sig, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug shared message master table. */ status = H5SM_table_debug(f, addr, stdout, 0, VCOL, UINT_MAX, UINT_MAX); } - else if (!HDmemcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug shared message list index. */ @@ -627,7 +627,7 @@ main(int argc, char *argv[]) status = H5SM_list_debug(f, addr, stdout, 0, VCOL, (haddr_t)extra[0]); } - else if (!HDmemcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug an extensible array header. */ @@ -648,7 +648,7 @@ main(int argc, char *argv[]) status = H5EA__hdr_debug(f, addr, stdout, 0, VCOL, cls, extra[0]); } - else if (!HDmemcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug an extensible array index block. */ @@ -669,7 +669,7 @@ main(int argc, char *argv[]) status = H5EA__iblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], extra[1]); } - else if (!HDmemcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug an extensible array super block. */ @@ -689,7 +689,7 @@ main(int argc, char *argv[]) status = H5EA__sblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1], extra[2]); } - else if (!HDmemcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug an extensible array data block. */ @@ -710,7 +710,7 @@ main(int argc, char *argv[]) status = H5EA__dblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (size_t)extra[1], extra[2]); } - else if (!HDmemcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a fixed array header. */ @@ -730,7 +730,7 @@ main(int argc, char *argv[]) status = H5FA__hdr_debug(f, addr, stdout, 0, VCOL, cls, extra[0]); } - else if (!HDmemcmp(sig, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug a fixed array data block. */ @@ -751,7 +751,7 @@ main(int argc, char *argv[]) status = H5FA__dblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], extra[1]); } - else if (!HDmemcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { + else if (!memcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* * Debug v2 object header (which have signatures). */ diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index 0848096..31deb8b 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -148,8 +148,8 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options) } /* Initialize fapl info structs */ - HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t)); - HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t)); + memset(&vol_info, 0, sizeof(h5tools_vol_info_t)); + memset(&vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* Parse command line options */ while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) { @@ -292,7 +292,7 @@ main(int argc, char *argv[]) h5tools_init(); /* Initialize the parameters */ - HDmemset(¶ms_g, 0, sizeof(params_g)); + memset(¶ms_g, 0, sizeof(params_g)); /* Create file access property list */ if ((params_g.fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) { diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index 4276f7a..37c2cc3 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -8608,11 +8608,11 @@ test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers } /* set the hyperslab values */ - HDmemset(buf, c, nelmts); + memset(buf, c, nelmts); /* make a different hyperslab at this position */ if (make_diffs && i == 512 * 512) - HDmemset(buf, 0, nelmts); + memset(buf, 0, nelmts); hs_start[0] = (unsigned long long)i * GBLL / (1024 * 1024); if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0) diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 4c6304d..aad1b8d 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -3874,10 +3874,10 @@ gent_multi(void) fapl = H5Pcreate(H5P_FILE_ACCESS); - HDmemset(memb_map, 0, sizeof memb_map); - HDmemset(memb_fapl, 0, sizeof memb_fapl); - HDmemset(memb_name, 0, sizeof memb_name); - HDmemset(memb_addr, 0, sizeof memb_addr); + memset(memb_map, 0, sizeof memb_map); + memset(memb_fapl, 0, sizeof memb_fapl); + memset(memb_name, 0, sizeof memb_name); + memset(memb_addr, 0, sizeof memb_addr); assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c index 9a3a891..5b8bfce 100644 --- a/tools/test/h5format_convert/h5fc_gentest.c +++ b/tools/test/h5format_convert/h5fc_gentest.c @@ -424,7 +424,7 @@ gen_err_level(const char *fname) /* Initialize data buffer */ buf = (unsigned char *)malloc(NUM * sizeof(unsigned char *)); - HDmemset(buf, 42, NUM * sizeof(unsigned char)); + memset(buf, 42, NUM * sizeof(unsigned char)); /* Create the test file */ if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl)) < 0) @@ -797,7 +797,7 @@ main(void) for (i = 0; i < 8; i++) { char filename[50]; - HDmemset(filename, 0, sizeof(filename)); + memset(filename, 0, sizeof(filename)); if (!new_format) HDstrcat(filename, "old_"); HDstrcat(filename, FILENAME[i]); diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c index 96e6407..d3b7388 100644 --- a/tools/test/h5jam/h5jamgentest.c +++ b/tools/test/h5jam/h5jamgentest.c @@ -326,7 +326,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill) goto error; /* Fill buf with pattern */ - HDmemset(buf, '\0', ub_size); + memset(buf, '\0', ub_size); bp = buf; for (u = 0; u < ub_fill; u++) *bp++ = pattern[u % 10]; diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index cf42d07..a9e8b40 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -194,8 +194,8 @@ main(void) h5tools_init(); /* initialize */ - HDmemset(&diff_options, 0, sizeof(diff_opt_t)); - HDmemset(&pack_options, 0, sizeof(pack_opt_t)); + memset(&diff_options, 0, sizeof(diff_opt_t)); + memset(&pack_options, 0, sizeof(pack_opt_t)); /* run tests */ puts("Testing h5repack:"); @@ -4241,7 +4241,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf12, 'z', sizeof buf12); + memset(buf12, 'z', sizeof buf12); } if ((tid = H5Tcopy(H5T_C_S1)) < 0) @@ -4259,7 +4259,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf22, 0, sizeof buf22); + memset(buf22, 0, sizeof buf22); } if ((tid = H5Tcopy(H5T_STD_B8LE)) < 0) @@ -4288,7 +4288,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf32, 0, sizeof buf32); + memset(buf32, 0, sizeof buf32); } if ((tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) < 0) @@ -4377,7 +4377,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf62, 0, sizeof buf62); + memset(buf62, 0, sizeof buf62); } if ((tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray)) < 0) @@ -4393,8 +4393,8 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf72, 0, sizeof buf72); - HDmemset(buf82, 0, sizeof buf82); + memset(buf72, 0, sizeof buf72); + memset(buf82, 0, sizeof buf82); } if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -4431,7 +4431,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf13, 'z', sizeof buf13); + memset(buf13, 'z', sizeof buf13); } if ((tid = H5Tcopy(H5T_C_S1)) < 0) @@ -5124,7 +5124,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da *------------------------------------------------------------------------- */ if (make_diffs) { - HDmemset(buf12, 'z', sizeof buf12); + memset(buf12, 'z', sizeof buf12); } /* @@ -5163,7 +5163,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf22, 0, sizeof buf22); + memset(buf22, 0, sizeof buf22); } /* @@ -5221,7 +5221,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da *------------------------------------------------------------------------- */ if (make_diffs) { - HDmemset(buf32, 0, sizeof buf32); + memset(buf32, 0, sizeof buf32); } /* @@ -5368,7 +5368,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf62, 0, sizeof buf62); + memset(buf62, 0, sizeof buf62); } /* buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; @@ -5410,8 +5410,8 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf72, 0, sizeof buf72); - HDmemset(buf82, 0, sizeof buf82); + memset(buf72, 0, sizeof buf72); + memset(buf82, 0, sizeof buf82); } /* Attribute: <integer2D> and <integer2D> @@ -5451,7 +5451,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf13, 'z', sizeof buf13); + memset(buf13, 'z', sizeof buf13); } /* diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c index d536e7e..bc15fdf 100644 --- a/tools/test/perform/iopipe.c +++ b/tools/test/perform/iopipe.c @@ -148,7 +148,7 @@ main(void) the_data = (unsigned char *)malloc((size_t)(size[0] * size[1])); /* initial fill for lazy malloc */ - HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1])); + memset(the_data, 0xAA, (size_t)(size[0] * size[1])); /* Fill raw */ synchronize(); @@ -160,7 +160,7 @@ main(void) for (u = 0; u < nwrite; u++) { HDputc(PROGRESS, stderr); fflush(stderr); - HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1])); + memset(the_data, 0xAA, (size_t)(size[0] * size[1])); } #ifdef H5_HAVE_GETRUSAGE getrusage(RUSAGE_SELF, &r_stop); diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index 2bcdb2a..b8b80e8 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -342,7 +342,7 @@ fill_with_random_data(Bytef *src, uLongf src_len) if (compress_percent) { size_t s = (size_t)((src_len * (uLongf)compress_percent) / 100); - HDmemset(src, '\0', s); + memset(src, '\0', s); } } |