summaryrefslogtreecommitdiffstats
path: root/tools/src/h5repack/h5repack_opttable.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 /tools/src/h5repack/h5repack_opttable.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 'tools/src/h5repack/h5repack_opttable.c')
-rw-r--r--tools/src/h5repack/h5repack_opttable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c
index 4e6e0f4..64f3011 100644
--- a/tools/src/h5repack/h5repack_opttable.c
+++ b/tools/src/h5repack/h5repack_opttable.c
@@ -104,7 +104,7 @@ aux_inctable(pack_opttbl_t *table, unsigned n_objs)
int ret_value = 0;
table->size += n_objs;
- table->objs = (pack_info_t *)HDrealloc(table->objs, table->size * sizeof(pack_info_t));
+ table->objs = (pack_info_t *)realloc(table->objs, table->size * sizeof(pack_info_t));
if (table->objs == NULL) {
H5TOOLS_INFO("not enough memory for options table");
ret_value = -1;
@@ -132,14 +132,14 @@ options_table_init(pack_opttbl_t **tbl)
pack_opttbl_t *table;
int ret_value = 0;
- if (NULL == (table = (pack_opttbl_t *)HDmalloc(sizeof(pack_opttbl_t)))) {
+ if (NULL == (table = (pack_opttbl_t *)malloc(sizeof(pack_opttbl_t)))) {
H5TOOLS_GOTO_ERROR((-1), "not enough memory for options table");
}
table->size = 30;
table->nelems = 0;
- if (NULL == (table->objs = (pack_info_t *)HDmalloc(table->size * sizeof(pack_info_t)))) {
- HDfree(table);
+ if (NULL == (table->objs = (pack_info_t *)malloc(table->size * sizeof(pack_info_t)))) {
+ free(table);
H5TOOLS_GOTO_ERROR((-1), "not enough memory for options table");
}
@@ -163,8 +163,8 @@ done:
int
options_table_free(pack_opttbl_t *table)
{
- HDfree(table->objs);
- HDfree(table);
+ free(table->objs);
+ free(table);
return 0;
}