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/src/misc | |
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/src/misc')
-rw-r--r-- | tools/src/misc/h5clear.c | 4 | ||||
-rw-r--r-- | tools/src/misc/h5mkgrp.c | 8 | ||||
-rw-r--r-- | tools/src/misc/h5repart.c | 12 |
3 files changed, 12 insertions, 12 deletions
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index 5f26ef4..4a6029c 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -353,9 +353,9 @@ main(int argc, char *argv[]) done: if (fname) - HDfree(fname); + free(fname); if (fname_g) - HDfree(fname_g); + free(fname_g); H5E_BEGIN_TRY { diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index 98b6b76..a359db6 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -58,11 +58,11 @@ leave(int ret) size_t curr_group; if (params_g.fname) - HDfree(params_g.fname); + free(params_g.fname); if (params_g.ngroups) { for (curr_group = 0; curr_group < params_g.ngroups; curr_group++) - HDfree(params_g.groups[curr_group]); - HDfree(params_g.groups); + free(params_g.groups[curr_group]); + free(params_g.groups); } if (H5I_INVALID_HID != params_g.fapl_id && H5P_DEFAULT != params_g.fapl_id) if (H5Pclose(params_g.fapl_id) < 0) @@ -246,7 +246,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options) /* Allocate space for the group name pointers */ options->ngroups = (size_t)(argc - H5_optind); - options->groups = (char **)HDmalloc(options->ngroups * sizeof(char *)); + options->groups = (char **)malloc(options->ngroups * sizeof(char *)); /* Retrieve the group names */ curr_group = 0; diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c index c4ea0a6..843e9a3 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -226,9 +226,9 @@ main(int argc, char *argv[]) } /* end while */ /* allocate names */ - if (NULL == (src_name = (char *)HDcalloc((size_t)NAMELEN, sizeof(char)))) + if (NULL == (src_name = (char *)calloc((size_t)NAMELEN, sizeof(char)))) HDexit(EXIT_FAILURE); - if (NULL == (dst_name = (char *)HDcalloc((size_t)NAMELEN, sizeof(char)))) + if (NULL == (dst_name = (char *)calloc((size_t)NAMELEN, sizeof(char)))) HDexit(EXIT_FAILURE); /* @@ -275,7 +275,7 @@ main(int argc, char *argv[]) usage(prog_name); /* Now the real work, split the file */ - buf = (char *)HDmalloc(blk_size); + buf = (char *)malloc(blk_size); while (src_offset < src_size) { /* Read a block. The amount to read is the minimum of: @@ -498,9 +498,9 @@ main(int argc, char *argv[]) } /* end if */ /* Free resources and return */ - HDfree(src_name); - HDfree(dst_name); - HDfree(buf); + free(src_name); + free(dst_name); + free(buf); return EXIT_SUCCESS; } /* end main */ H5_GCC_CLANG_DIAG_ON("format-nonliteral") |