diff options
Diffstat (limited to 'tools/lib/h5tools.c')
-rw-r--r-- | tools/lib/h5tools.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index e0e3e06..50c6aae 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -2043,7 +2043,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai H5TOOLS_THROW((-1), "H5Dget_space failed"); /* Allocate space for the dimension array */ - if ((dims1 = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL) + if ((dims1 = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL) H5TOOLS_THROW((-1), "Could not allocate buffer for dims"); /* find the dimensions of each data space from the block coordinates */ @@ -2060,15 +2060,15 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai if ((type_size = H5Tget_size(type_id)) == 0) H5TOOLS_THROW((-1), "H5Tget_size failed"); - if ((region_buf = HDmalloc(type_size * (size_t)numelem)) == NULL) + if ((region_buf = malloc(type_size * (size_t)numelem)) == NULL) H5TOOLS_THROW((-1), "Could not allocate region buffer"); /* Select (x , x , ..., x ) x (y , y , ..., y ) hyperslab for reading memory dataset */ /* 1 2 n 1 2 n */ - if ((start = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL) + if ((start = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL) H5TOOLS_THROW((-1), "Could not allocate buffer for start"); - if ((count = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL) + if ((count = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL) H5TOOLS_THROW((-1), "Could not allocate buffer for count"); for (blkndx = 0; blkndx < nblocks; blkndx++) { @@ -2093,10 +2093,10 @@ done:; } /* end for (blkndx = 0; blkndx < nblocks; blkndx++) */ CATCH - HDfree(start); - HDfree(count); - HDfree(region_buf); - HDfree(dims1); + free(start); + free(count); + free(region_buf); + free(dims1); if (H5Sclose(mem_space) < 0) H5TOOLS_ERROR((-1), "H5Sclose failed"); @@ -2142,7 +2142,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea ndims = (unsigned)sndims; alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); - if ((ptdata = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL) + if ((ptdata = (hsize_t *)malloc((size_t)alloc_size)) == NULL) H5TOOLS_GOTO_ERROR(FALSE, "Could not allocate buffer for ptdata"); if (H5Sget_select_hyper_blocklist(region_space, (hsize_t)0, nblocks, ptdata) < 0) @@ -2156,7 +2156,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea render_bin_output_region_data_blocks(region_id, stream, container, ndims, type_id, nblocks, ptdata); done: - HDfree(ptdata); + free(ptdata); if (type_id > 0 && H5Tclose(type_id) < 0) H5TOOLS_ERROR(FALSE, "H5Tclose failed"); @@ -2202,11 +2202,11 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE * if ((type_size = H5Tget_size(type_id)) == 0) H5TOOLS_GOTO_ERROR((-1), "H5Tget_size failed"); - if ((region_buf = HDmalloc(type_size * (size_t)npoints)) == NULL) + if ((region_buf = malloc(type_size * (size_t)npoints)) == NULL) H5TOOLS_GOTO_ERROR((-1), "Could not allocate buffer for region"); /* Allocate space for the dimension array */ - if ((dims1 = (hsize_t *)HDmalloc(sizeof(hsize_t) * ndims)) == NULL) + if ((dims1 = (hsize_t *)malloc(sizeof(hsize_t) * ndims)) == NULL) H5TOOLS_GOTO_ERROR((-1), "Could not allocate buffer for dims"); dims1[0] = npoints; @@ -2222,8 +2222,8 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE * H5TOOLS_GOTO_ERROR((-1), "render_bin_output of data points failed"); done: - HDfree(region_buf); - HDfree(dims1); + free(region_buf); + free(dims1); if (H5Sclose(mem_space) < 0) H5TOOLS_ERROR((-1), "H5Sclose failed"); |