Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove HD/hbool_t from high-level lib #3183

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions hl/fortran/src/H5DSfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen)

done:
if (c_dimname)
HDfree(c_dimname);
free(c_dimname);

return ret_value;

Expand Down Expand Up @@ -231,7 +231,7 @@ h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen)

done:
if (c_label)
HDfree(c_label);
free(c_label);

return ret_value;

Expand Down Expand Up @@ -262,7 +262,7 @@ h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size)
/*
* Allocate buffer to hold label
*/
if ((c_label = (char *)HDmalloc((size_t)*size + 1)) == NULL)
if ((c_label = (char *)malloc((size_t)*size + 1)) == NULL)
HGOTO_DONE(FAIL);

/*
Expand All @@ -282,7 +282,7 @@ h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size)
*size = (size_t_f)size_c; /* Don't subtract '1' because H5DSget_label doesn't include the
* trailing NULL in the length calculation, Ref. HDFFV-7596 */
if (c_label)
HDfree(c_label);
free(c_label);
return ret_value;

} /* end h5dsget_label_c() */
Expand Down Expand Up @@ -312,7 +312,7 @@ h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size)
/*
* Allocate buffer to hold name
*/
if ((c_scale_name = (char *)HDmalloc((size_t)*size + 1)) == NULL)
if ((c_scale_name = (char *)malloc((size_t)*size + 1)) == NULL)
HGOTO_DONE(FAIL);

/*
Expand All @@ -330,7 +330,7 @@ h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size)

done:
if (c_scale_name)
HDfree(c_scale_name);
free(c_scale_name);
return ret_value;

} /* end h5dsget_scale_name_c() */
Expand Down
4 changes: 2 additions & 2 deletions hl/fortran/src/H5IMcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ H5IM_get_palette(hid_t loc_id, const char *image_name, int pal_number, hid_t tid

dim_ref = (size_t)n_refs;

refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * dim_ref);
refbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * dim_ref);

if (H5Aread(attr_id, attr_type, refbuf) < 0)
goto out;
Expand All @@ -489,7 +489,7 @@ H5IM_get_palette(hid_t loc_id, const char *image_name, int pal_number, hid_t tid
if (H5Dclose(pal_id) < 0)
goto out;

HDfree(refbuf);
free(refbuf);

} /* H5T_REFERENCE */

Expand Down
34 changes: 17 additions & 17 deletions hl/fortran/src/H5IMfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ h5immake_image_8bit_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);

return ret_value;
}
Expand Down Expand Up @@ -110,7 +110,7 @@ h5imread_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *buf)

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);

return ret_value;
}
Expand Down Expand Up @@ -168,9 +168,9 @@ h5immake_image_24bit_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);
if (c_il != NULL)
HDfree(c_il);
free(c_il);

return ret_value;
}
Expand Down Expand Up @@ -215,7 +215,7 @@ h5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *w
/*
* allocate buffer to hold name of an attribute
*/
if ((c_buf = (char *)HDmalloc((size_t)*ilen + 1)) == NULL)
if ((c_buf = (char *)malloc((size_t)*ilen + 1)) == NULL)
goto done;

/*
Expand All @@ -242,9 +242,9 @@ h5imget_image_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *w

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);
if (c_buf != NULL)
HDfree(c_buf);
free(c_buf);

return ret_value;
}
Expand Down Expand Up @@ -287,7 +287,7 @@ h5imis_image_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name)
ret = H5IMis_image(c_loc_id, c_name);

if (c_name != NULL)
HDfree(c_name);
free(c_name);

return ret;
}
Expand Down Expand Up @@ -334,7 +334,7 @@ h5immake_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dim

done:
if (c_name)
HDfree(c_name);
free(c_name);

return ret_value;
}
Expand Down Expand Up @@ -389,9 +389,9 @@ h5imlink_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *ilen

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);
if (c_namepal != NULL)
HDfree(c_namepal);
free(c_namepal);

return ret_value;
}
Expand Down Expand Up @@ -446,9 +446,9 @@ h5imunlink_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *il

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);
if (c_namepal != NULL)
HDfree(c_namepal);
free(c_namepal);

return ret_value;
}
Expand Down Expand Up @@ -501,7 +501,7 @@ h5imget_npalettes_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *np

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);

return ret_value;
}
Expand Down Expand Up @@ -557,7 +557,7 @@ h5imget_palette_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);

return ret_value;
}
Expand Down Expand Up @@ -607,7 +607,7 @@ h5imget_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *pal_numb

done:
if (c_name != NULL)
HDfree(c_name);
free(c_name);

return ret_value;
}
Expand Down Expand Up @@ -650,7 +650,7 @@ h5imis_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name)
ret = H5IMis_palette(c_loc_id, c_name);

if (c_name != NULL)
HDfree(c_name);
free(c_name);

return ret;
}
Loading