summaryrefslogtreecommitdiffstats
path: root/hl/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /hl/src
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'hl/src')
-rw-r--r--hl/src/H5DO.c4
-rw-r--r--hl/src/H5DS.c156
-rw-r--r--hl/src/H5IM.c20
-rw-r--r--hl/src/H5LD.c44
-rw-r--r--hl/src/H5LT.c84
-rw-r--r--hl/src/H5LTanalyze.c8
-rw-r--r--hl/src/H5LTparse.c10
-rw-r--r--hl/src/H5PT.c18
-rw-r--r--hl/src/H5TB.c78
9 files changed, 211 insertions, 211 deletions
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c
index 580c6a1..28fe494 100644
--- a/hl/src/H5DO.c
+++ b/hl/src/H5DO.c
@@ -199,7 +199,7 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, hid_t
goto done;
/* Allocate the boundary array */
- boundary = (hsize_t *)HDmalloc(ndims * sizeof(hsize_t));
+ boundary = (hsize_t *)malloc(ndims * sizeof(hsize_t));
/* Retrieve the append flush property */
if (H5Pget_append_flush(dapl, ndims, boundary, &append_cb, &udata) < 0)
@@ -247,7 +247,7 @@ done:
ret_value = FAIL;
if (boundary)
- HDfree(boundary);
+ free(boundary);
return ret_value;
} /* H5DOappend() */
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 34de473..6656f5e 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -310,7 +310,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -322,11 +322,11 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
/* store the REF information in the index of the dataset that has the DS */
buf[idx].len = 1;
if (is_new_ref) {
- buf[idx].p = HDmalloc(1 * sizeof(H5R_ref_t));
+ buf[idx].p = malloc(1 * sizeof(H5R_ref_t));
((H5R_ref_t *)buf[idx].p)[0] = nref_to_ds;
}
else {
- buf[idx].p = HDmalloc(1 * sizeof(hobj_ref_t));
+ buf[idx].p = malloc(1 * sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[0] = ref_to_ds;
}
/* write the attribute with the reference */
@@ -344,9 +344,9 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf[idx].p);
+ free(buf[idx].p);
buf[idx].p = NULL;
- HDfree(buf);
+ free(buf);
buf = NULL;
}
@@ -366,7 +366,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -421,11 +421,11 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
buf[idx].len++;
len = buf[idx].len;
if (is_new_ref) {
- buf[idx].p = HDrealloc(buf[idx].p, len * sizeof(H5R_ref_t));
+ buf[idx].p = realloc(buf[idx].p, len * sizeof(H5R_ref_t));
((H5R_ref_t *)buf[idx].p)[len - 1] = nref_to_ds;
}
else {
- buf[idx].p = HDrealloc(buf[idx].p, len * sizeof(hobj_ref_t));
+ buf[idx].p = realloc(buf[idx].p, len * sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[len - 1] = ref_to_ds;
}
} /* end if */
@@ -433,11 +433,11 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
/* store the REF information in the index of the dataset that has the DS */
buf[idx].len = 1;
if (is_new_ref) {
- buf[idx].p = HDmalloc(sizeof(H5R_ref_t));
+ buf[idx].p = malloc(sizeof(H5R_ref_t));
((H5R_ref_t *)buf[idx].p)[0] = nref_to_ds;
}
else {
- buf[idx].p = HDmalloc(sizeof(hobj_ref_t));
+ buf[idx].p = malloc(sizeof(hobj_ref_t));
((hobj_ref_t *)buf[idx].p)[0] = ref_to_ds;
}
} /* end else */
@@ -460,7 +460,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* has_dimlist */
@@ -554,14 +554,14 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
nelmts++;
if (is_new_ref) {
- ndsbuf = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, ndsbuf) < 0)
goto out;
}
else {
- dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, dsbuf) < 0)
@@ -580,12 +580,12 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
/* Allocate new buffer to copy old references and add new one */
if (is_new_ref) {
- ndsbuf_w = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf_w = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf_w == NULL)
goto out;
}
else {
- dsbuf_w = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf_w = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf_w == NULL)
goto out;
}
@@ -653,15 +653,15 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
if (H5Tclose(ntid) < 0)
goto out;
if (is_new_ref) {
- HDfree(ndsbuf);
+ free(ndsbuf);
dsbuf = NULL;
- HDfree(ndsbuf_w);
+ free(ndsbuf_w);
dsbuf = NULL;
}
else {
- HDfree(dsbuf);
+ free(dsbuf);
dsbuf = NULL;
- HDfree(dsbuf_w);
+ free(dsbuf_w);
dsbuf = NULL;
}
} /* has_reflist */
@@ -684,11 +684,11 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
/* error zone */
out:
if (buf)
- HDfree(buf);
+ free(buf);
if (dsbuf)
- HDfree(dsbuf);
+ free(dsbuf);
if (dsbuf_w)
- HDfree(dsbuf_w);
+ free(dsbuf_w);
H5E_BEGIN_TRY
{
@@ -853,7 +853,7 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -915,7 +915,7 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
}
len = --buf[idx].len;
if (len == 0) {
- HDfree(buf[idx].p);
+ free(buf[idx].p);
buf[idx].p = NULL;
}
/* Since a reference to a dim. scale can be inserted only once,
@@ -958,7 +958,7 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
/*-------------------------------------------------------------------------
@@ -984,22 +984,22 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (is_new_ref) {
- ndsbuf = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, ndsbuf) < 0)
goto out;
- ndsbuf_w = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf_w = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf_w == NULL)
goto out;
}
else {
- dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, dsbuf) < 0)
goto out;
- dsbuf_w = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf_w = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf_w == NULL)
goto out;
}
@@ -1152,14 +1152,14 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
if (H5Tclose(ntid) < 0)
goto out;
if (is_new_ref) {
- HDfree(ndsbuf);
- HDfree(ndsbuf_w);
+ free(ndsbuf);
+ free(ndsbuf_w);
ndsbuf = NULL;
ndsbuf_w = NULL;
}
else {
- HDfree(dsbuf);
- HDfree(dsbuf_w);
+ free(dsbuf);
+ free(dsbuf_w);
dsbuf = NULL;
dsbuf_w = NULL;
}
@@ -1176,15 +1176,15 @@ out:
H5Tclose(tid);
if (ndsbuf) {
- HDfree(ndsbuf);
+ free(ndsbuf);
ndsbuf = NULL;
}
if (ndsbuf_w) {
- HDfree(ndsbuf_w);
+ free(ndsbuf_w);
ndsbuf_w = NULL;
}
if (dsbuf) {
- HDfree(dsbuf);
+ free(dsbuf);
dsbuf = NULL;
}
if (buf) {
@@ -1192,9 +1192,9 @@ out:
free the pointers allocated when we read data in */
for (i = 0; i < rank; i++) {
if (buf[i].p)
- HDfree(buf[i].p);
+ free(buf[i].p);
}
- HDfree(buf);
+ free(buf);
buf = NULL;
}
}
@@ -1337,7 +1337,7 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -1396,7 +1396,7 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* has_dimlist */
@@ -1433,14 +1433,14 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (is_new_ref) {
- ndsbuf = (nds_list_t *)HDmalloc((size_t)nelmts * sizeof(nds_list_t));
+ ndsbuf = (nds_list_t *)malloc((size_t)nelmts * sizeof(nds_list_t));
if (ndsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, ndsbuf) < 0)
goto out;
}
else {
- dsbuf = (ds_list_t *)HDmalloc((size_t)nelmts * sizeof(ds_list_t));
+ dsbuf = (ds_list_t *)malloc((size_t)nelmts * sizeof(ds_list_t));
if (dsbuf == NULL)
goto out;
if (H5Aread(aid, ntid, dsbuf) < 0)
@@ -1515,11 +1515,11 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
goto out;
if (ndsbuf) {
- HDfree(ndsbuf);
+ free(ndsbuf);
ndsbuf = NULL;
}
if (dsbuf) {
- HDfree(dsbuf);
+ free(dsbuf);
dsbuf = NULL;
}
} /* has_reflist */
@@ -1541,15 +1541,15 @@ out:
H5E_END_TRY;
if (buf) {
- HDfree(buf);
+ free(buf);
buf = NULL;
}
if (ndsbuf) {
- HDfree(ndsbuf);
+ free(ndsbuf);
ndsbuf = NULL;
}
if (dsbuf) {
- HDfree(dsbuf);
+ free(dsbuf);
dsbuf = NULL;
}
return FAIL;
@@ -1672,7 +1672,7 @@ H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx, H5DS_iterate_t visi
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -1748,7 +1748,7 @@ H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx, H5DS_iterate_t visi
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* if has_dimlist */
@@ -1759,7 +1759,7 @@ out:
{
if (buf) {
H5Treclaim(tid, sid, H5P_DEFAULT, buf);
- HDfree(buf);
+ free(buf);
}
H5Sclose(sid);
H5Aclose(aid);
@@ -1799,7 +1799,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
char const **const_buf; /* buf calls */
} u;
- HDmemset(&u, 0, sizeof(u));
+ memset(&u, 0, sizeof(u));
/*-------------------------------------------------------------------------
* parameter checking
@@ -1862,7 +1862,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
goto out;
/* allocate and initialize */
- u.const_buf = (char const **)HDmalloc((size_t)rank * sizeof(char *));
+ u.const_buf = (char const **)malloc((size_t)rank * sizeof(char *));
if (u.const_buf == NULL)
goto out;
@@ -1885,7 +1885,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
if (H5Aclose(aid) < 0)
goto out;
if (u.const_buf) {
- HDfree(u.const_buf);
+ free(u.const_buf);
u.const_buf = NULL;
}
}
@@ -1904,7 +1904,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
goto out;
/* allocate and initialize */
- u.buf = (char **)HDmalloc((size_t)rank * sizeof(char *));
+ u.buf = (char **)malloc((size_t)rank * sizeof(char *));
if (u.buf == NULL)
goto out;
@@ -1915,7 +1915,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
/* free the ptr that will be replaced by label */
if (u.buf[idx])
- HDfree(u.buf[idx]);
+ free(u.buf[idx]);
/* store the label information in the required index */
u.const_buf[idx] = label;
@@ -1930,7 +1930,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
/* free all the ptr's from the H5Aread() */
for (i = 0; i < (unsigned int)rank; i++) {
if (u.buf[i])
- HDfree(u.buf[i]);
+ free(u.buf[i]);
}
/* close */
@@ -1939,7 +1939,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label)
if (H5Aclose(aid) < 0)
goto out;
if (u.buf) {
- HDfree(u.buf);
+ free(u.buf);
u.buf = NULL;
}
}
@@ -1955,9 +1955,9 @@ out:
/* free all the ptr's from the H5Aread() */
for (i = 0; i < (unsigned int)rank; i++) {
if (u.buf[i])
- HDfree(u.buf[i]);
+ free(u.buf[i]);
}
- HDfree(u.buf);
+ free(u.buf);
}
H5E_BEGIN_TRY
{
@@ -2054,7 +2054,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
goto out;
/* allocate and initialize */
- buf = (char **)HDmalloc((size_t)rank * sizeof(char *));
+ buf = (char **)malloc((size_t)rank * sizeof(char *));
if (buf == NULL)
goto out;
@@ -2073,7 +2073,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
/* copy all/some of the name */
if (label) {
- HDmemcpy(label, buf[idx], copy_len);
+ memcpy(label, buf[idx], copy_len);
/* terminate the string */
label[copy_len] = '\0';
@@ -2082,7 +2082,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
/* free all the ptr's from the H5Aread() */
for (i = 0; i < rank; i++) {
if (buf[i])
- HDfree(buf[i]);
+ free(buf[i]);
}
/* close */
@@ -2091,7 +2091,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
if (H5Aclose(aid) < 0)
goto out;
if (buf) {
- HDfree(buf);
+ free(buf);
buf = NULL;
}
@@ -2103,9 +2103,9 @@ out:
/* free all the ptr's from the H5Aread() */
for (i = 0; i < rank; i++) {
if (buf[i])
- HDfree(buf[i]);
+ free(buf[i]);
}
- HDfree(buf);
+ free(buf);
}
H5E_BEGIN_TRY
{
@@ -2192,7 +2192,7 @@ H5DSget_scale_name(hid_t did, char *name, size_t size)
goto out;
/* allocate a temporary buffer */
- buf = (char *)HDmalloc(nbytes * sizeof(char));
+ buf = (char *)malloc(nbytes * sizeof(char));
if (buf == NULL)
goto out;
@@ -2205,7 +2205,7 @@ H5DSget_scale_name(hid_t did, char *name, size_t size)
/* copy all/some of the name */
if (name) {
- HDmemcpy(name, buf, copy_len);
+ memcpy(name, buf, copy_len);
/* terminate the string */
name[copy_len] = '\0';
@@ -2219,7 +2219,7 @@ H5DSget_scale_name(hid_t did, char *name, size_t size)
if (H5Sclose(sid) < 0)
goto out;
if (buf)
- HDfree(buf);
+ free(buf);
return (ssize_t)(nbytes - 1);
@@ -2233,7 +2233,7 @@ out:
}
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
return FAIL;
}
@@ -2315,7 +2315,7 @@ H5DSis_scale(hid_t did)
goto out;
}
- buf = (char *)HDmalloc((size_t)string_size * sizeof(char));
+ buf = (char *)malloc((size_t)string_size * sizeof(char));
if (buf == NULL)
goto out;
@@ -2327,7 +2327,7 @@ H5DSis_scale(hid_t did)
if (HDstrncmp(buf, DIMENSION_SCALE_CLASS, MIN(HDstrlen(DIMENSION_SCALE_CLASS), HDstrlen(buf))) == 0)
is_ds = 1;
- HDfree(buf);
+ free(buf);
if (H5Tclose(tid) < 0)
goto out;
@@ -2337,7 +2337,7 @@ H5DSis_scale(hid_t did)
}
out:
if (is_ds < 0) {
- HDfree(buf);
+ free(buf);
H5E_BEGIN_TRY
{
H5Aclose(aid);
@@ -2427,7 +2427,7 @@ H5DSget_num_scales(hid_t did, unsigned int idx)
goto out;
/* allocate and initialize the VL */
- buf = (hvl_t *)HDmalloc((size_t)rank * sizeof(hvl_t));
+ buf = (hvl_t *)malloc((size_t)rank * sizeof(hvl_t));
if (buf == NULL)
goto out;
@@ -2446,7 +2446,7 @@ H5DSget_num_scales(hid_t did, unsigned int idx)
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(buf);
+ free(buf);
buf = NULL;
} /* has_dimlist */
@@ -2463,7 +2463,7 @@ out:
H5E_END_TRY;
if (buf)
- HDfree(buf);
+ free(buf);
return FAIL;
}
@@ -2510,7 +2510,7 @@ H5DS_is_reserved(hid_t did, hbool_t *is_reserved)
/* Allocate buffer large enough to hold string */
if ((string_size = H5Tget_size(tid)) == 0)
goto error;
- if (NULL == (buf = HDmalloc(string_size * sizeof(char))))
+ if (NULL == (buf = malloc(string_size * sizeof(char))))
goto error;
/* Read the attribute */
@@ -2524,7 +2524,7 @@ H5DS_is_reserved(hid_t did, hbool_t *is_reserved)
else
*is_reserved = FALSE;
- HDfree(buf);
+ free(buf);
if (H5Tclose(tid) < 0)
goto error;
@@ -2541,7 +2541,7 @@ error:
}
H5E_END_TRY;
- HDfree(buf);
+ free(buf);
return FAIL;
}
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c
index 25381fd..e38f096 100644
--- a/hl/src/H5IM.c
+++ b/hl/src/H5IM.c
@@ -570,7 +570,7 @@ H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
dim_ref = (hsize_t)n_refs + 1;
- refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
+ refbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
if (H5Aread(aid, atid, refbuf) < 0)
goto out;
@@ -611,7 +611,7 @@ H5IMlink_palette(hid_t loc_id, const char *image_name, const char *pal_name)
if (H5Aclose(aid) < 0)
goto out;
- HDfree(refbuf);
+ free(refbuf);
} /* ok_pal > 0 */
@@ -868,7 +868,7 @@ H5IMget_palette_info(hid_t loc_id, const char *image_name, int pal_number, hsize
dim_ref = (hsize_t)n_refs;
- refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
+ refbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
if (H5Aread(aid, atid, refbuf) < 0)
goto out;
@@ -897,7 +897,7 @@ H5IMget_palette_info(hid_t loc_id, const char *image_name, int pal_number, hsize
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(refbuf);
+ free(refbuf);
}
/* Close the image dataset. */
@@ -975,7 +975,7 @@ H5IMget_palette(hid_t loc_id, const char *image_name, int pal_number, unsigned c
dim_ref = (hsize_t)n_refs;
- refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
+ refbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * (size_t)dim_ref);
if (H5Aread(aid, atid, refbuf) < 0)
goto out;
@@ -997,7 +997,7 @@ H5IMget_palette(hid_t loc_id, const char *image_name, int pal_number, unsigned c
goto out;
if (H5Aclose(aid) < 0)
goto out;
- HDfree(refbuf);
+ free(refbuf);
}
/* Close the image dataset. */
@@ -1081,7 +1081,7 @@ H5IMis_image(hid_t loc_id, const char *dset_name)
if ((storage_size = H5Aget_storage_size(aid)) == 0)
goto out;
- attr_data = (char *)HDmalloc((size_t)storage_size * sizeof(char) + 1);
+ attr_data = (char *)malloc((size_t)storage_size * sizeof(char) + 1);
if (attr_data == NULL)
goto out;
@@ -1093,7 +1093,7 @@ H5IMis_image(hid_t loc_id, const char *dset_name)
else
ret = 0;
- HDfree(attr_data);
+ free(attr_data);
if (H5Tclose(atid) < 0)
goto out;
@@ -1180,7 +1180,7 @@ H5IMis_palette(hid_t loc_id, const char *dset_name)
if ((storage_size = H5Aget_storage_size(aid)) == 0)
goto out;
- attr_data = (char *)HDmalloc((size_t)storage_size * sizeof(char) + 1);
+ attr_data = (char *)malloc((size_t)storage_size * sizeof(char) + 1);
if (attr_data == NULL)
goto out;
@@ -1192,7 +1192,7 @@ H5IMis_palette(hid_t loc_id, const char *dset_name)
else
ret = 0;
- HDfree(attr_data);
+ free(attr_data);
if (H5Tclose(atid) < 0)
goto out;
diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c
index 30257f6..5e39c08 100644
--- a/hl/src/H5LD.c
+++ b/hl/src/H5LD.c
@@ -43,12 +43,12 @@ H5LD_clean_vector(H5LD_memb_t *listv[])
{
unsigned n; /* Local index variable */
- HDassert(listv);
+ assert(listv);
/* Go through info for each field stored in listv[] */
for (n = 0; listv[n] != NULL; n++) {
if (listv[n]->names) {
- HDfree(listv[n]->names);
+ free(listv[n]->names);
listv[n]->names = NULL;
} /* end if */
@@ -59,7 +59,7 @@ H5LD_clean_vector(H5LD_memb_t *listv[])
} /* end if */
/* Free the H5LD_memb_t structure for the field */
- HDfree(listv[n]);
+ free(listv[n]);
listv[n] = NULL;
} /* end for */
} /* H5LD_clean_vector() */
@@ -159,8 +159,8 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid)
char *fields_ptr; /* Pointer to "fields" */
int ret_value = FAIL; /* Return value */
- HDassert(listv);
- HDassert(fields);
+ assert(listv);
+ assert(fields);
fields_ptr = fields;
nfields = 0;
@@ -178,11 +178,11 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid)
len = (HDstrlen(fields_ptr) / 2) + 2;
/* Allocate memory for an H5LD_memb_t for storing a field's info */
- if (NULL == (memb = (H5LD_memb_t *)HDcalloc((size_t)1, sizeof(H5LD_memb_t))))
+ if (NULL == (memb = (H5LD_memb_t *)calloc((size_t)1, sizeof(H5LD_memb_t))))
goto done;
/* Allocate memory for an array of pointers to member names */
- if (NULL == (memb->names = (char **)HDcalloc(len, sizeof(char *))))
+ if (NULL == (memb->names = (char **)calloc(len, sizeof(char *))))
goto done;
memb->names[j] = fields_ptr;
@@ -251,8 +251,8 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid)
} /* end if */
else {
if (memb) {
- HDfree(memb->names);
- HDfree(memb);
+ free(memb->names);
+ free(memb);
}
goto done;
} /* end else */
@@ -350,7 +350,7 @@ H5LD_get_dset_type_size(hid_t did, const char *fields)
size_t tot = 0; /* Data type size of all the fields in "fields" */
int n = 0, num = 0; /* Local index variables */
- HDassert(fields && *fields);
+ assert(fields && *fields);
/* Should be a compound datatype if "fields" exists */
if (H5Tget_class(dset_tid) != H5T_COMPOUND)
@@ -362,7 +362,7 @@ H5LD_get_dset_type_size(hid_t did, const char *fields)
/* Allocate memory for a list of H5LD_memb_t pointers to store "fields" info */
len = (HDstrlen(fields) / 2) + 2;
- if (NULL == (listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))))
+ if (NULL == (listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *))))
goto done;
/* Process and store info for "fields" */
@@ -388,11 +388,11 @@ done:
/* Free the array of H5LD_memb_t pointers */
if (listv)
- HDfree(listv);
+ free(listv);
/* Free memory */
if (dup_fields)
- HDfree(dup_fields);
+ free(dup_fields);
return (ret_value);
} /* H5LD_get_dset_type_size() */
@@ -440,8 +440,8 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
goto done;
/* Verify that cur_dims must have one dimension whose size is greater than prev_dims */
- HDmemset(start, 0, sizeof start);
- HDmemset(count, 0, sizeof count);
+ memset(start, 0, sizeof start);
+ memset(count, 0, sizeof count);
ctr = 0;
for (i = 0; i < ndims; i++)
if (cur_dims[i] > prev_dims[i]) {
@@ -462,7 +462,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
goto done;
} /* end if */
else { /* changes for more than one dimensions */
- HDmemset(start, 0, sizeof start);
+ memset(start, 0, sizeof start);
/* Make the selection in the dataset based on "cur_dims" and "prev_dims" */
if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, cur_dims, NULL) < 0)
@@ -506,7 +506,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
goto done;
/* Allocate memory for reading in the elements in the dataset selection */
- if (NULL == (sav_buf = tmp_buf = (char *)HDcalloc((size_t)num_elmts, tot_tsize)))
+ if (NULL == (sav_buf = tmp_buf = (char *)calloc((size_t)num_elmts, tot_tsize)))
goto done;
/* Read the dataset elements in the selection */
@@ -519,7 +519,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
/* Allocate memory for the vector of H5LD_memb_t pointers */
len = (HDstrlen(fields) / 2) + 2;
- if (NULL == (listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))))
+ if (NULL == (listv = (H5LD_memb_t **)calloc(len, sizeof(H5LD_memb_t *))))
goto done;
/* Process and store information for "fields" */
@@ -532,7 +532,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
/* Copy data for "fields" to the input buffer */
for (j = 0; listv[j] != NULL; j++) {
- HDmemcpy(buf_p, tmp_buf + listv[j]->tot_offset, listv[j]->last_tsize);
+ memcpy(buf_p, tmp_buf + listv[j]->tot_offset, listv[j]->last_tsize);
buf_p += listv[j]->last_tsize;
} /* end for */
tmp_buf += tot_tsize;
@@ -555,13 +555,13 @@ done:
/* Free the array of H5LD_memb_t pointers */
if (listv)
- HDfree(listv);
+ free(listv);
/* Free memory */
if (dup_fields)
- HDfree(dup_fields);
+ free(dup_fields);
if (sav_buf)
- HDfree(sav_buf);
+ free(sav_buf);
return (ret_value);
} /* H5LD_get_dset_elmts() */
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 4c61aa8..90f0fbf 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -304,7 +304,7 @@ image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *
if (udata->vfd_ref_count != 1)
goto out;
- if (NULL == (udata->vfd_image_ptr = HDrealloc(ptr, size)))
+ if (NULL == (udata->vfd_image_ptr = realloc(ptr, size)))
goto out;
udata->vfd_image_size = size;
@@ -356,7 +356,7 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
* references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
!(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
- HDfree(udata->fapl_image_ptr);
+ free(udata->fapl_image_ptr);
udata->app_image_ptr = NULL;
udata->fapl_image_ptr = NULL;
udata->vfd_image_ptr = NULL;
@@ -375,7 +375,7 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
* references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
!(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
- HDfree(udata->vfd_image_ptr);
+ free(udata->vfd_image_ptr);
udata->app_image_ptr = NULL;
udata->fapl_image_ptr = NULL;
udata->vfd_image_ptr = NULL;
@@ -463,7 +463,7 @@ udata_free(void *_udata)
/* checks that there are no references outstanding before deallocating udata */
if (udata->ref_count == 0 && udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0)
- HDfree(udata);
+ free(udata);
return (SUCCEED);
@@ -832,7 +832,7 @@ H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
H5LT_file_image_ud_t *udata; /* Pointer to udata structure */
/* Allocate buffer to communicate user data to callbacks */
- if (NULL == (udata = (H5LT_file_image_ud_t *)HDmalloc(sizeof(H5LT_file_image_ud_t))))
+ if (NULL == (udata = (H5LT_file_image_ud_t *)malloc(sizeof(H5LT_file_image_ud_t))))
goto out;
/* Initialize udata with info about app buffer containing file image and flags */
@@ -852,7 +852,7 @@ H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
/* Set file image callbacks */
if (H5Pset_file_image_callbacks(fapl, &callbacks) < 0) {
- HDfree(udata);
+ free(udata);
goto out;
} /* end if */
} /* end if */
@@ -2021,7 +2021,7 @@ H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
goto out;
if (lang_type != H5LT_DDL) {
- HDfprintf(stderr, "only DDL is supported for now.\n");
+ fprintf(stderr, "only DDL is supported for now.\n");
goto out;
}
@@ -2029,11 +2029,11 @@ H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
myinput = HDstrdup(text);
if ((type_id = H5LTyyparse()) < 0) {
- HDfree(myinput);
+ free(myinput);
goto out;
}
- HDfree(myinput);
+ free(myinput);
input_len = 0;
return type_id;
@@ -2074,9 +2074,9 @@ realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, const char *str
*len += INCREMENT;
}
- tmp_realloc = (char *)HDrealloc(buf, *len);
+ tmp_realloc = (char *)realloc(buf, *len);
if (tmp_realloc == NULL) {
- HDfree(buf);
+ free(buf);
buf = NULL;
goto out;
}
@@ -2131,7 +2131,7 @@ indentation(size_t x, char *str, hbool_t no_u_buf, size_t *s_len)
char tmp_str[TMP_LEN];
if (x < 80) {
- HDmemset(tmp_str, ' ', x);
+ memset(tmp_str, ' ', x);
tmp_str[x] = '\0';
}
else
@@ -2191,8 +2191,8 @@ print_enum(hid_t type, char *str, size_t *str_len, hbool_t no_ubuf, size_t indt)
dst_size = H5Tget_size(native);
/* Get the names and raw values of all members */
- name = (char **)HDcalloc((size_t)nmembs, sizeof(char *));
- value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(dst_size, super_size));
+ name = (char **)calloc((size_t)nmembs, sizeof(char *));
+ value = (unsigned char *)calloc((size_t)nmembs, MAX(dst_size, super_size));
for (i = 0; i < nmembs; i++) {
if ((name[i] = H5Tget_member_name(type, (unsigned)i)) == NULL)
@@ -2219,7 +2219,7 @@ print_enum(hid_t type, char *str, size_t *str_len, hbool_t no_ubuf, size_t indt)
nchars = HDsnprintf(tmp_str, TMP_LEN, "\"%s\"", name[i]);
if (!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
- HDmemset(tmp_str, ' ', (size_t)MAX(3, 19 - nchars) + 1);
+ memset(tmp_str, ' ', (size_t)MAX(3, 19 - nchars) + 1);
tmp_str[MAX(3, 19 - nchars)] = '\0';
if (!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
@@ -2240,8 +2240,8 @@ print_enum(hid_t type, char *str, size_t *str_len, hbool_t no_ubuf, size_t indt)
for (i = 0; i < nmembs; i++)
H5free_memory(name[i]);
- HDfree(name);
- HDfree(value);
+ free(name);
+ free(value);
H5Tclose(super);
return str;
@@ -2250,8 +2250,8 @@ out:
if (0 == nmembs) {
str = realloc_and_append(no_ubuf, str_len, str, "\n");
- HDassert((indt + 4) < TMP_LEN);
- HDmemset(tmp_str, ' ', (indt + 4) + 1);
+ assert((indt + 4) < TMP_LEN);
+ memset(tmp_str, ' ', (indt + 4) + 1);
tmp_str[(indt + 4)] = '\0';
str = realloc_and_append(no_ubuf, str_len, str, tmp_str);
str = realloc_and_append(no_ubuf, str_len, str, " <empty>");
@@ -2261,12 +2261,12 @@ out:
if (name) {
for (i = 0; i < nmembs; i++)
if (name[i])
- HDfree(name[i]);
- HDfree(name);
+ free(name[i]);
+ free(name);
} /* end if */
if (value)
- HDfree(value);
+ free(value);
if (super >= 0)
H5Tclose(super);
@@ -2300,13 +2300,13 @@ H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len)
goto out;
if (len && !str) {
- text_str = (char *)HDcalloc(str_len, sizeof(char));
+ text_str = (char *)calloc(str_len, sizeof(char));
text_str[0] = '\0';
if (!(text_str = H5LT_dtype_to_text(dtype, text_str, lang_type, &str_len, 1)))
goto out;
*len = HDstrlen(text_str) + 1;
if (text_str)
- HDfree(text_str);
+ free(text_str);
text_str = NULL;
}
else if (len && str) {
@@ -2318,7 +2318,7 @@ H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len)
return ret;
out:
- HDfree(text_str);
+ free(text_str);
return FAIL;
}
@@ -2694,18 +2694,18 @@ next:
goto out;
if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
goto out;
- stmp = (char *)HDcalloc(super_len, sizeof(char));
+ stmp = (char *)calloc(super_len, sizeof(char));
if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp))) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (stmp)
- HDfree(stmp);
+ free(stmp);
stmp = NULL;
HDsnprintf(tmp_str, TMP_LEN, ";\n");
@@ -2741,18 +2741,18 @@ next:
goto out;
if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
goto out;
- stmp = (char *)HDcalloc(super_len, sizeof(char));
+ stmp = (char *)calloc(super_len, sizeof(char));
if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp))) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (stmp)
- HDfree(stmp);
+ free(stmp);
stmp = NULL;
HDsnprintf(tmp_str, TMP_LEN, "\n");
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
@@ -2802,17 +2802,17 @@ next:
goto out;
if (H5LTdtype_to_text(super, NULL, lang, &super_len) < 0)
goto out;
- stmp = (char *)HDcalloc(super_len, sizeof(char));
+ stmp = (char *)calloc(super_len, sizeof(char));
if (H5LTdtype_to_text(super, stmp, lang, &super_len) < 0) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, stmp))) {
- HDfree(stmp);
+ free(stmp);
goto out;
}
if (stmp)
- HDfree(stmp);
+ free(stmp);
stmp = NULL;
HDsnprintf(tmp_str, TMP_LEN, "\n");
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, tmp_str)))
@@ -2860,17 +2860,17 @@ next:
if (H5LTdtype_to_text(mtype, NULL, lang, &mlen) < 0)
goto out;
- mtmp = (char *)HDcalloc(mlen, sizeof(char));
+ mtmp = (char *)calloc(mlen, sizeof(char));
if (H5LTdtype_to_text(mtype, mtmp, lang, &mlen) < 0) {
- HDfree(mtmp);
+ free(mtmp);
goto out;
}
if (!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, mtmp))) {
- HDfree(mtmp);
+ free(mtmp);
goto out;
}
if (mtmp)
- HDfree(mtmp);
+ free(mtmp);
mtmp = NULL;
if (H5T_COMPOUND == mclass)
@@ -3611,7 +3611,7 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
done:
if (tmp_path != NULL)
- HDfree(tmp_path);
+ free(tmp_path);
return ret_value;
}
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index 3f6feaa..45e3c57 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -1480,7 +1480,7 @@ case 55:
YY_RULE_SETUP
#line 117 "hl/src//H5LTanalyze.l"
{
- H5LTyylval.ival = HDatoi(yytext);
+ H5LTyylval.ival = atoi(yytext);
return NUMBER;
}
YY_BREAK
@@ -2552,7 +2552,7 @@ trim_quotes(const char *quoted)
size_t len = HDstrlen(quoted);
char *trimmed;
- HDassert(quoted[0] == '"' && quoted[len - 1] == '"');
+ assert(quoted[0] == '"' && quoted[len - 1] == '"');
trimmed = HDstrdup(quoted + 1);
trimmed[len - 2] = '\0';
@@ -2564,14 +2564,14 @@ static int my_yyinput(char *buf, int max_size)
{
int ret;
- HDmemcpy(buf, myinput, input_len);
+ memcpy(buf, myinput, input_len);
ret = (int)input_len;
return ret;
}
int H5LTyyerror(const char *msg)
{
- HDprintf("ERROR: %s before \"%s\".\n", msg, yytext);
+ printf("ERROR: %s before \"%s\".\n", msg, yytext);
return 0;
}
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index fb12d2c..4386a7c 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -1643,7 +1643,7 @@ yyreduce:
}
}
if((yyvsp[-2].sval)) {
- HDfree((yyvsp[-2].sval));
+ free((yyvsp[-2].sval));
(yyvsp[-2].sval) = NULL;
}
cmpd_stack[csindex].is_field = 0;
@@ -1658,7 +1658,7 @@ yyreduce:
#line 205 "hl/src//H5LTparse.y"
{
(yyval.sval) = HDstrdup(yylval.sval);
- HDfree(yylval.sval);
+ free(yylval.sval);
yylval.sval = NULL;
}
#line 1634 "hl/src//H5LTparse.c"
@@ -1728,7 +1728,7 @@ yyreduce:
#line 253 "hl/src//H5LTparse.y"
{
H5Tset_tag((yyvsp[-3].hid), yylval.sval);
- HDfree(yylval.sval);
+ free(yylval.sval);
yylval.sval = NULL;
}
#line 1704 "hl/src//H5LTparse.c"
@@ -1872,7 +1872,7 @@ yyreduce:
{
is_enum_memb = 1; /*indicate member of enum*/
enum_memb_symbol = HDstrdup(yylval.sval);
- HDfree(yylval.sval);
+ free(yylval.sval);
yylval.sval = NULL;
}
#line 1848 "hl/src//H5LTparse.c"
@@ -1916,7 +1916,7 @@ yyreduce:
}
is_enum_memb = 0;
- if(enum_memb_symbol) HDfree(enum_memb_symbol);
+ if(enum_memb_symbol) free(enum_memb_symbol);
}
H5Tclose(super);
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index 9d5d627..65cdce3 100644
--- a/hl/src/H5PT.c
+++ b/hl/src/H5PT.c
@@ -84,7 +84,7 @@ H5PTcreate(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_si
goto error;
/* Get memory for the table identifier */
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ table = (htbl_t *)malloc(sizeof(htbl_t));
if (table == NULL) {
goto error;
}
@@ -153,7 +153,7 @@ error:
if (table) {
if (table->type_id != H5I_INVALID_HID)
H5Tclose(table->type_id);
- HDfree(table);
+ free(table);
}
return ret_value;
@@ -203,7 +203,7 @@ H5PTcreate_fl(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk
goto error;
/* Get memory for the table identifier */
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ table = (htbl_t *)malloc(sizeof(htbl_t));
if (table == NULL) {
goto error;
}
@@ -267,7 +267,7 @@ error:
if (table) {
if (table->type_id != H5I_INVALID_HID)
H5Tclose(table->type_id);
- HDfree(table);
+ free(table);
}
return ret_value;
@@ -310,7 +310,7 @@ H5PTopen(hid_t loc_id, const char *dset_name)
H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
goto error;
- table = (htbl_t *)HDmalloc(sizeof(htbl_t));
+ table = (htbl_t *)malloc(sizeof(htbl_t));
if (table == NULL) {
goto error;
}
@@ -370,7 +370,7 @@ error:
H5Tclose(table->type_id);
if (table->dset_id != H5I_INVALID_HID)
H5Dclose(table->dset_id);
- HDfree(table);
+ free(table);
}
return ret_value;
@@ -387,7 +387,7 @@ error:
static herr_t
H5PT_free_id(void *id, void H5_ATTR_UNUSED **_ctx)
{
- HDfree(id);
+ free(id);
return SUCCEED;
}
@@ -422,7 +422,7 @@ H5PT_close(htbl_t *table)
if (H5Tclose(table->type_id) < 0)
goto error;
- HDfree(table);
+ free(table);
return SUCCEED;
@@ -432,7 +432,7 @@ error:
H5Dclose(table->dset_id);
H5Tclose(table->type_id);
H5E_END_TRY
- HDfree(table);
+ free(table);
}
return FAIL;
}
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index dd938bf..ccbee50 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -1229,9 +1229,9 @@ H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
if (H5TBget_table_info(loc_id, dset_name, &nfields, &ntotal_records) < 0)
goto out;
- if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
- if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
@@ -1251,7 +1251,7 @@ H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
read_nrecords = ntotal_records - read_start;
if (read_nrecords) {
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)read_nrecords, src_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)read_nrecords, src_size)))
goto out;
/* read the records after the deleted one(s) */
@@ -1317,11 +1317,11 @@ H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
out:
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (src_offset)
- HDfree(src_offset);
+ free(src_offset);
if (src_sizes)
- HDfree(src_sizes);
+ free(src_sizes);
if (mem_type_id > 0)
if (H5Tclose(mem_type_id) < 0)
ret_val = -1;
@@ -1401,7 +1401,7 @@ H5TBinsert_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
goto out;
read_nrecords = ntotal_records - start;
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)read_nrecords, type_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)read_nrecords, type_size)))
goto out;
/* read the records after the inserted one(s) */
@@ -1473,7 +1473,7 @@ H5TBinsert_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr
out:
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (sid > 0)
if (H5Sclose(sid) < 0)
ret_val = -1;
@@ -1543,9 +1543,9 @@ H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize
if (H5TBget_table_info(loc_id, dset_name1, &nfields, &ntotal_records) < 0)
goto out;
- if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
- if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
@@ -1573,7 +1573,7 @@ H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize
if (0 == (type_size1 = H5Tget_size(tid)))
goto out;
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size1)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, type_size1)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
@@ -1601,11 +1601,11 @@ H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize
out:
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (src_offset)
- HDfree(src_offset);
+ free(src_offset);
if (src_sizes)
- HDfree(src_sizes);
+ free(src_sizes);
if (tid > 0)
if (H5Tclose(tid) < 0)
ret_val = -1;
@@ -1696,9 +1696,9 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
if (H5TBget_table_info(loc_id1, dset_name1, &nfields, &nrecords) < 0)
goto out;
- if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
- if (NULL == (src_sizes = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_sizes = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
@@ -1773,7 +1773,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
goto out;
/* alloc fill value attribute buffer */
- if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(type_size)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)malloc(type_size)))
goto out;
/* get the fill value attributes */
@@ -1823,7 +1823,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
* read data from 1st table
*-------------------------------------------------------------------------
*/
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, type_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
@@ -1856,7 +1856,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
if (H5Sclose(m_sid) < 0)
goto out;
m_sid = H5I_INVALID_HID;
- HDfree(tmp_buf);
+ free(tmp_buf);
tmp_buf = NULL;
/*-------------------------------------------------------------------------
@@ -1889,7 +1889,7 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
*-------------------------------------------------------------------------
*/
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, type_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, type_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
@@ -1919,13 +1919,13 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c
out:
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (tmp_fill_buf)
- HDfree(tmp_fill_buf);
+ free(tmp_fill_buf);
if (src_offset)
- HDfree(src_offset);
+ free(src_offset);
if (src_sizes)
- HDfree(src_sizes);
+ free(src_sizes);
if (member_type_id > 0)
if (H5Tclose(member_type_id) < 0)
ret_val = -1;
@@ -2087,7 +2087,7 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
goto out;
/* alloc fill value attribute buffer */
- if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc(total_size)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)malloc(total_size)))
goto out;
/* get the fill value attributes */
@@ -2188,7 +2188,7 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
*-------------------------------------------------------------------------
*/
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, (size_t)total_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, (size_t)total_size)))
goto out;
/* define a hyperslab in the dataset of the size of the records */
@@ -2346,9 +2346,9 @@ out:
if (member_name)
H5free_memory(member_name);
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (tmp_fill_buf)
- HDfree(tmp_fill_buf);
+ free(tmp_fill_buf);
if (preserve_id > 0)
if (H5Pclose(preserve_id) < 0)
ret_val = -1;
@@ -2544,7 +2544,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
curr_offset = 0;
/* alloc fill value attribute buffer */
- if (NULL == (tmp_fill_buf = (unsigned char *)HDmalloc((size_t)type_size2)))
+ if (NULL == (tmp_fill_buf = (unsigned char *)malloc((size_t)type_size2)))
goto out;
/*-------------------------------------------------------------------------
@@ -2653,7 +2653,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
if (H5Tinsert(read_type_id, member_name, (size_t)0, member_type_id) < 0)
goto out;
- if (NULL == (tmp_buf = (unsigned char *)HDcalloc((size_t)nrecords, member_size)))
+ if (NULL == (tmp_buf = (unsigned char *)calloc((size_t)nrecords, member_size)))
goto out;
/* read */
@@ -2698,7 +2698,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name)
goto out;
write_type_id = H5I_INVALID_HID;
- HDfree(tmp_buf);
+ free(tmp_buf);
tmp_buf = NULL;
} /* end if */
@@ -2788,9 +2788,9 @@ out:
if (member_name)
H5free_memory(member_name);
if (tmp_fill_buf)
- HDfree(tmp_fill_buf);
+ free(tmp_fill_buf);
if (tmp_buf)
- HDfree(tmp_buf);
+ free(tmp_buf);
if (attr_id > 0)
if (H5Aclose(attr_id) < 0)
ret_val = -1;
@@ -2907,7 +2907,7 @@ H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, unsigned char
if (H5TBget_table_info(loc_id, dset_name, &nfields, &nrecords) < 0)
goto out;
- if (NULL == (src_offset = (size_t *)HDmalloc((size_t)nfields * sizeof(size_t))))
+ if (NULL == (src_offset = (size_t *)malloc((size_t)nfields * sizeof(size_t))))
goto out;
/* get field info */
@@ -2931,7 +2931,7 @@ H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, unsigned char
out:
if (src_offset)
- HDfree(src_offset);
+ free(src_offset);
return ret_val;
} /* end H5TBAget_fill() */
@@ -3279,11 +3279,11 @@ H5TB_create_type(hid_t loc_id, const char *dset_name, size_t type_size, const si
if (H5TBget_table_info(loc_id, dset_name, &nfields, NULL) < 0)
goto out;
- if (NULL == (fnames = (char **)HDcalloc(sizeof(char *), (size_t)nfields)))
+ if (NULL == (fnames = (char **)calloc(sizeof(char *), (size_t)nfields)))
goto out;
for (i = 0; i < nfields; i++)
- if (NULL == (fnames[i] = (char *)HDmalloc(HLTB_MAX_FIELD_LEN)))
+ if (NULL == (fnames[i] = (char *)malloc(HLTB_MAX_FIELD_LEN)))
goto out;
/* get field info */
@@ -3321,8 +3321,8 @@ out:
if (fnames) {
for (i = 0; i < nfields; i++)
if (fnames[i])
- HDfree(fnames[i]);
- HDfree(fnames);
+ free(fnames[i]);
+ free(fnames);
} /* end if */
if (mtype_id > 0)
if (H5Tclose(mtype_id) < 0)