diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 22:48:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 22:48:12 (GMT) |
commit | aebac33a1f290fa5065bce96bb0512317a34c283 (patch) | |
tree | cdbae6dbd65a2eb4e6f786921ee907cec92c92d3 /tools/lib/h5diff.c | |
parent | 605cea4af60cfcbe03a54f697de392eec75e5a85 (diff) | |
download | hdf5-aebac33a1f290fa5065bce96bb0512317a34c283.zip hdf5-aebac33a1f290fa5065bce96bb0512317a34c283.tar.gz hdf5-aebac33a1f290fa5065bce96bb0512317a34c283.tar.bz2 |
Remove HD from memory allocate/free calls (#3195)
* HDcalloc
* HDfree
* HDmalloc
* HDrealloc
Diffstat (limited to 'tools/lib/h5diff.c')
-rw-r--r-- | tools/lib/h5diff.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 8f8522b..cb3295f 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -297,7 +297,7 @@ free_exclude_path_list(diff_opt_t *opts) while (NULL != curr) { next = curr->next; - HDfree(curr); + free(curr); curr = next; } } @@ -315,7 +315,7 @@ free_exclude_attr_list(diff_opt_t *opts) while (NULL != curr) { next = curr->next; - HDfree(curr); + free(curr); curr = next; } } @@ -575,7 +575,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata) done: if (lnk_info.trg_path) - HDfree(lnk_info.trg_path); + free(lnk_info.trg_path); H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -710,7 +710,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); #else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ - if ((obj1fullname = (char *)HDmalloc(HDstrlen(objname1) + 2)) == NULL) + if ((obj1fullname = (char *)malloc(HDstrlen(objname1) + 2)) == NULL) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); HDstrcpy(obj1fullname, "/"); @@ -729,7 +729,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); #else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ - if ((obj2fullname = (char *)HDmalloc(HDstrlen(objname2) + 2)) == NULL) + if ((obj2fullname = (char *)malloc(HDstrlen(objname2) + 2)) == NULL) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); HDstrcpy(obj2fullname, "/"); HDstrcat(obj2fullname, objname2); @@ -1067,15 +1067,15 @@ done: /* free buffers */ if (obj1fullname) - HDfree(obj1fullname); + free(obj1fullname); if (obj2fullname) - HDfree(obj2fullname); + free(obj2fullname); /* free link info buffer */ if (trg_linfo1.trg_path) - HDfree(trg_linfo1.trg_path); + free(trg_linfo1.trg_path); if (trg_linfo2.trg_path) - HDfree(trg_linfo2.trg_path); + free(trg_linfo2.trg_path); /* close */ H5E_BEGIN_TRY @@ -1164,7 +1164,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, */ #ifdef H5_HAVE_PARALLEL { - char *workerTasks = (char *)HDmalloc((size_t)(g_nTasks - 1) * sizeof(char)); + char *workerTasks = (char *)malloc((size_t)(g_nTasks - 1) * sizeof(char)); int n; int busyTasks = 0; struct diffs_found nFoundbyWorker; @@ -1186,7 +1186,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } #else /* H5_HAVE_ASPRINTF */ - if ((obj1_fullpath = (char *)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == + if ((obj1_fullpath = (char *)malloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } @@ -1204,7 +1204,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } #else /* H5_HAVE_ASPRINTF */ - if ((obj2_fullpath = (char *)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == + if ((obj2_fullpath = (char *)malloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } @@ -1401,9 +1401,9 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, } /* end else */ #endif /* H5_HAVE_PARALLEL */ if (obj1_fullpath) - HDfree(obj1_fullpath); + free(obj1_fullpath); if (obj2_fullpath) - HDfree(obj2_fullpath); + free(obj2_fullpath); } /* end if */ } /* end for */ H5TOOLS_DEBUG("done with for loop - errstat:%d", opts->err_stat); @@ -1493,7 +1493,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, } /* end if */ H5TOOLS_DEBUG("done with if block"); - HDfree(workerTasks); + free(workerTasks); } #endif /* H5_HAVE_PARALLEL */ @@ -1912,9 +1912,9 @@ done: /* free link info buffer */ if (linkinfo1.trg_path) - HDfree(linkinfo1.trg_path); + free(linkinfo1.trg_path); if (linkinfo2.trg_path) - HDfree(linkinfo2.trg_path); + free(linkinfo2.trg_path); /* close */ /* disable error reporting */ |