summaryrefslogtreecommitdiffstats
path: root/test/cmpd_dset.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/cmpd_dset.c')
-rw-r--r--test/cmpd_dset.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 8d1f877..62b409d 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -182,17 +182,17 @@ test_compound(char *filename, hid_t fapl)
int ret_code;
/* Allocate buffers for datasets */
- if (NULL == (s1 = (s1_t *)HDmalloc(sizeof(s1_t) * NX * NY)))
+ if (NULL == (s1 = (s1_t *)malloc(sizeof(s1_t) * NX * NY)))
goto error;
- if (NULL == (s2 = (s2_t *)HDmalloc(sizeof(s2_t) * NX * NY)))
+ if (NULL == (s2 = (s2_t *)malloc(sizeof(s2_t) * NX * NY)))
goto error;
- if (NULL == (s3 = (s3_t *)HDmalloc(sizeof(s3_t) * NX * NY)))
+ if (NULL == (s3 = (s3_t *)malloc(sizeof(s3_t) * NX * NY)))
goto error;
- if (NULL == (s4 = (s4_t *)HDmalloc(sizeof(s4_t) * NX * NY)))
+ if (NULL == (s4 = (s4_t *)malloc(sizeof(s4_t) * NX * NY)))
goto error;
- if (NULL == (s5 = (s5_t *)HDmalloc(sizeof(s5_t) * NX * NY)))
+ if (NULL == (s5 = (s5_t *)malloc(sizeof(s5_t) * NX * NY)))
goto error;
- if (NULL == (s6 = (s6_t *)HDmalloc(sizeof(s6_t) * NX * NY)))
+ if (NULL == (s6 = (s6_t *)malloc(sizeof(s6_t) * NX * NY)))
goto error;
/* Create the file */
@@ -581,7 +581,7 @@ test_compound(char *filename, hid_t fapl)
goto error;
/* Read the dataset */
- s8 = (s1_t *)HDcalloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t));
+ s8 = (s1_t *)calloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t));
assert(s8);
if (H5Dread(dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) {
goto error;
@@ -602,7 +602,7 @@ test_compound(char *filename, hid_t fapl)
}
}
- HDfree(s8);
+ free(s8);
s8 = NULL;
PASSED();
@@ -714,7 +714,7 @@ test_compound(char *filename, hid_t fapl)
f_offset[1] = NY / 3;
h_size[0] = 2 * NX / 3 - f_offset[0];
h_size[1] = 2 * NY / 3 - f_offset[1];
- s11 = (s4_t *)HDmalloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t));
+ s11 = (s4_t *)malloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t));
assert(s11);
/* Initialize */
@@ -726,7 +726,7 @@ test_compound(char *filename, hid_t fapl)
if (H5Dwrite(dataset, s4_tid, s8_m_sid, s8_f_sid, PRESERVE, s11) < 0) {
goto error;
}
- HDfree(s11);
+ free(s11);
s11 = NULL;
/* Read the whole thing */
@@ -773,12 +773,12 @@ test_compound(char *filename, hid_t fapl)
H5Fclose(file);
/* Release buffers */
- HDfree(s1);
- HDfree(s2);
- HDfree(s3);
- HDfree(s4);
- HDfree(s5);
- HDfree(s6);
+ free(s1);
+ free(s2);
+ free(s3);
+ free(s4);
+ free(s5);
+ free(s6);
PASSED();
return 0;
@@ -788,17 +788,17 @@ error:
/* Release resources */
if (s1)
- HDfree(s1);
+ free(s1);
if (s2)
- HDfree(s2);
+ free(s2);
if (s3)
- HDfree(s3);
+ free(s3);
if (s4)
- HDfree(s4);
+ free(s4);
if (s5)
- HDfree(s5);
+ free(s5);
if (s6)
- HDfree(s6);
+ free(s6);
return 1;
}
@@ -1306,12 +1306,12 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
goto error;
/* Allocate space and initialize data */
- orig = (unsigned char *)HDmalloc(NX * NY * sizeof(stype1));
+ orig = (unsigned char *)malloc(NX * NY * sizeof(stype1));
initialize_stype1(orig, (size_t)NX * NY);
- rbuf = (unsigned char *)HDmalloc(NX * NY * sizeof(stype2));
+ rbuf = (unsigned char *)malloc(NX * NY * sizeof(stype2));
- rew_buf = (unsigned char *)HDmalloc(NX * NY * sizeof(stype3));
+ rew_buf = (unsigned char *)malloc(NX * NY * sizeof(stype3));
initialize_stype3(rew_buf, (size_t)NX * NY);
/* Create dataset creation property list */
@@ -1440,17 +1440,17 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR;
- HDfree(orig);
- HDfree(rbuf);
- HDfree(rew_buf);
+ free(orig);
+ free(rbuf);
+ free(rew_buf);
PASSED();
return 0;
error:
- HDfree(orig);
- HDfree(rbuf);
- HDfree(rew_buf);
+ free(orig);
+ free(rbuf);
+ free(rew_buf);
HDputs("*** DATASET TESTS FAILED ***");
return 1;
@@ -1512,12 +1512,12 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
goto error;
/* Allocate space and initialize data */
- orig = (unsigned char *)HDmalloc(NX * NY * sizeof(stype2));
+ orig = (unsigned char *)malloc(NX * NY * sizeof(stype2));
initialize_stype2(orig, (size_t)NX * NY);
- rbuf = (unsigned char *)HDmalloc(NX * NY * sizeof(stype1));
+ rbuf = (unsigned char *)malloc(NX * NY * sizeof(stype1));
- rew_buf = (unsigned char *)HDmalloc(NX * NY * sizeof(stype4));
+ rew_buf = (unsigned char *)malloc(NX * NY * sizeof(stype4));
initialize_stype4(rew_buf, (size_t)NX * NY);
/* Create dataset creation property list */
@@ -1646,9 +1646,9 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if (H5Fclose(file) < 0)
goto error;
- HDfree(orig);
- HDfree(rbuf);
- HDfree(rew_buf);
+ free(orig);
+ free(rbuf);
+ free(rew_buf);
PASSED();
return 0;