summaryrefslogtreecommitdiffstats
path: root/tools/test/misc
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-28 22:48:12 (GMT)
committerGitHub <noreply@github.com>2023-06-28 22:48:12 (GMT)
commitaebac33a1f290fa5065bce96bb0512317a34c283 (patch)
treecdbae6dbd65a2eb4e6f786921ee907cec92c92d3 /tools/test/misc
parent605cea4af60cfcbe03a54f697de392eec75e5a85 (diff)
downloadhdf5-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/test/misc')
-rw-r--r--tools/test/misc/clear_open_chk.c4
-rw-r--r--tools/test/misc/h5clear_gentest.c4
-rw-r--r--tools/test/misc/h5repart_gentest.c12
-rw-r--r--tools/test/misc/talign.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c
index ac31375..b57eb4a 100644
--- a/tools/test/misc/clear_open_chk.c
+++ b/tools/test/misc/clear_open_chk.c
@@ -54,10 +54,10 @@ main(int argc, char *argv[])
/* Try opening the file */
if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
fprintf(stderr, "clear_open_chk: unable to open the file\n");
- HDfree(fname);
+ free(fname);
HDexit(EXIT_FAILURE);
}
- HDfree(fname);
+ free(fname);
/* Close the file */
if (H5Fclose(fid) < 0) {
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 31796c1..3636c98 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -124,7 +124,7 @@ gen_cache_image_file(const char *fname)
if (H5Fclose(fid) < 0)
goto error;
- HDfree(buf);
+ free(buf);
return 0;
@@ -140,7 +140,7 @@ error:
}
H5E_END_TRY
- HDfree(buf);
+ free(buf);
return 1;
} /* gen_cache_image_file() */
diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c
index 04ac8e7..1f26c4d 100644
--- a/tools/test/misc/h5repart_gentest.c
+++ b/tools/test/misc/h5repart_gentest.c
@@ -36,12 +36,12 @@ main(void)
hsize_t dims[2] = {FAMILY_NUMBER, FAMILY_SIZE};
/* Set up data array */
- if (NULL == (buf_data = (int *)HDcalloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) {
- HDperror("HDcalloc");
+ if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) {
+ HDperror("calloc");
HDexit(EXIT_FAILURE);
}
- if (NULL == (buf = (int **)HDcalloc(FAMILY_NUMBER, sizeof(buf_data)))) {
- HDperror("HDcalloc");
+ if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data)))) {
+ HDperror("calloc");
HDexit(EXIT_FAILURE);
}
for (i = 0; i < FAMILY_NUMBER; i++)
@@ -103,8 +103,8 @@ main(void)
HDexit(EXIT_FAILURE);
}
- HDfree(buf);
- HDfree(buf_data);
+ free(buf);
+ free(buf_data);
HDputs(" PASSED");
HDfflush(stdout);
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 72b98ed..c876d9f 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -122,7 +122,7 @@ main(void)
H5Dclose(set);
/* Now open the set, and read it back in */
- data = (char *)HDmalloc(H5Tget_size(fix));
+ data = (char *)malloc(H5Tget_size(fix));
if (!data) {
HDperror("malloc() failed");
@@ -186,7 +186,7 @@ out:
}
if (data)
- HDfree(data);
+ free(data);
H5Sclose(spc);
H5Tclose(cs6);
H5Tclose(cmp);