summaryrefslogtreecommitdiffstats
path: root/test/objcopy_ref.c
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 /test/objcopy_ref.c
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 'test/objcopy_ref.c')
-rw-r--r--test/objcopy_ref.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 23deb2c..eac44bb 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -105,7 +105,7 @@ token_insert(H5O_info2_t *oinfo)
/* Extend the table */
if (idtab_g.nobjs >= idtab_g.nalloc) {
idtab_g.nalloc = MAX(256, 2 * idtab_g.nalloc);
- idtab_g.obj = (H5O_token_t *)HDrealloc(idtab_g.obj, idtab_g.nalloc * sizeof(idtab_g.obj[0]));
+ idtab_g.obj = (H5O_token_t *)realloc(idtab_g.obj, idtab_g.nalloc * sizeof(idtab_g.obj[0]));
}
/* Insert the entry */
@@ -161,7 +161,7 @@ static void
token_reset(void)
{
if (idtab_g.obj)
- HDfree(idtab_g.obj);
+ free(idtab_g.obj);
idtab_g.obj = NULL;
idtab_g.nalloc = idtab_g.nobjs = 0;
} /* end token_reset() */
@@ -635,9 +635,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
/* Check the raw data is equal */
/* Allocate & initialize space for the raw data buffers */
- if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
- if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf2 = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
/* Read data from the source attribute */
@@ -668,9 +668,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Release raw data buffers */
- HDfree(rbuf);
+ free(rbuf);
rbuf = NULL;
- HDfree(rbuf2);
+ free(rbuf2);
rbuf2 = NULL;
/* close the source dataspace */
@@ -693,9 +693,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
error:
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
if (rbuf2)
- HDfree(rbuf2);
+ free(rbuf2);
H5E_BEGIN_TRY
{
H5Sclose(sid2);
@@ -1172,9 +1172,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
/* Check the raw data is equal */
/* Allocate & initialize space for the raw data buffers */
- if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
- if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL)
+ if ((rbuf2 = calloc(elmt_size, (size_t)nelmts)) == NULL)
TEST_ERROR;
/* Read data from datasets */
@@ -1203,9 +1203,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Release raw data buffers */
- HDfree(rbuf);
+ free(rbuf);
rbuf = NULL;
- HDfree(rbuf2);
+ free(rbuf2);
rbuf2 = NULL;
/* close the source dataspace */
@@ -1235,9 +1235,9 @@ error:
H5E_BEGIN_TRY
{
if (rbuf)
- HDfree(rbuf);
+ free(rbuf);
if (rbuf2)
- HDfree(rbuf2);
+ free(rbuf2);
H5Pclose(dcpl2);
H5Pclose(dcpl);
H5Sclose(sid2);