summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/tmisc.c')
-rw-r--r--test/tmisc.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index 8d4e417..a2e8343 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -520,8 +520,8 @@ test_misc2_write_attribute(void)
ret = H5Fclose(file2);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(string_att1);
- HDfree(string_att2);
+ free(string_att1);
+ free(string_att2);
}
static void
@@ -734,7 +734,7 @@ create_struct3(void)
misc5_struct3_hndl *str3hndl; /* New 'struct3' created */
herr_t ret; /* For error checking */
- str3hndl = (misc5_struct3_hndl *)HDmalloc(sizeof(misc5_struct3_hndl));
+ str3hndl = (misc5_struct3_hndl *)malloc(sizeof(misc5_struct3_hndl));
CHECK_PTR(str3hndl, "malloc");
str3hndl->st3h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct3));
@@ -760,7 +760,7 @@ delete_struct3(misc5_struct3_hndl *str3hndl)
ret = H5Tclose(str3hndl->st3h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str3hndl);
+ free(str3hndl);
}
static void
@@ -777,8 +777,8 @@ create_struct2(void)
misc5_struct2_hndl *str2hndl; /* New 'struct2' created */
herr_t ret; /* For error checking */
- str2hndl = (misc5_struct2_hndl *)HDmalloc(sizeof(misc5_struct2_hndl));
- CHECK_PTR(str2hndl, "HDmalloc");
+ str2hndl = (misc5_struct2_hndl *)malloc(sizeof(misc5_struct2_hndl));
+ CHECK_PTR(str2hndl, "malloc");
str2hndl->st2h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct2));
CHECK(str2hndl->st2h_base, FAIL, "H5Tcreate");
@@ -812,7 +812,7 @@ delete_struct2(misc5_struct2_hndl *str2hndl)
H5Tclose(str2hndl->st2h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str2hndl);
+ free(str2hndl);
}
static void
@@ -823,8 +823,8 @@ set_struct2(misc5_struct2 *buf)
buf->st2_el1 = MISC5_DBGELVAL2;
buf->st2_el2.len = MISC5_DBGNELM3;
- buf->st2_el2.p = HDmalloc((buf->st2_el2.len) * sizeof(misc5_struct3));
- CHECK_PTR(buf->st2_el2.p, "HDmalloc");
+ buf->st2_el2.p = malloc((buf->st2_el2.len) * sizeof(misc5_struct3));
+ CHECK_PTR(buf->st2_el2.p, "malloc");
for (i = 0; i < (buf->st2_el2.len); i++)
set_struct3(&(((misc5_struct3 *)(buf->st2_el2.p))[i]));
@@ -833,7 +833,7 @@ set_struct2(misc5_struct2 *buf)
static void
clear_struct2(misc5_struct2 *buf)
{
- HDfree(buf->st2_el2.p);
+ free(buf->st2_el2.p);
}
/*********************** struct1 ***********************/
@@ -844,8 +844,8 @@ create_struct1(void)
misc5_struct1_hndl *str1hndl; /* New 'struct1' created */
herr_t ret; /* For error checking */
- str1hndl = (misc5_struct1_hndl *)HDmalloc(sizeof(misc5_struct1_hndl));
- CHECK_PTR(str1hndl, "HDmalloc");
+ str1hndl = (misc5_struct1_hndl *)malloc(sizeof(misc5_struct1_hndl));
+ CHECK_PTR(str1hndl, "malloc");
str1hndl->st1h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct1));
CHECK(str1hndl->st1h_base, FAIL, "H5Tcreate");
@@ -879,7 +879,7 @@ delete_struct1(misc5_struct1_hndl *str1hndl)
ret = H5Tclose(str1hndl->st1h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str1hndl);
+ free(str1hndl);
}
static void
@@ -890,8 +890,8 @@ set_struct1(misc5_struct1 *buf)
buf->st1_el1 = MISC5_DBGELVAL1;
buf->st1_el2.len = MISC5_DBGNELM2;
- buf->st1_el2.p = HDmalloc((buf->st1_el2.len) * sizeof(misc5_struct2));
- CHECK_PTR(buf->st1_el2.p, "HDmalloc");
+ buf->st1_el2.p = malloc((buf->st1_el2.len) * sizeof(misc5_struct2));
+ CHECK_PTR(buf->st1_el2.p, "malloc");
for (i = 0; i < (buf->st1_el2.len); i++)
set_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
@@ -904,7 +904,7 @@ clear_struct1(misc5_struct1 *buf)
for (i = 0; i < buf->st1_el2.len; i++)
clear_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
- HDfree(buf->st1_el2.p);
+ free(buf->st1_el2.p);
}
static void
@@ -941,8 +941,8 @@ test_misc5(void)
/* Create the variable-length buffer */
buf.len = MISC5_DBGNELM1;
- buf.p = HDmalloc((buf.len) * sizeof(misc5_struct1));
- CHECK_PTR(buf.p, "HDmalloc");
+ buf.p = malloc((buf.len) * sizeof(misc5_struct1));
+ CHECK_PTR(buf.p, "malloc");
/* Create the top-level VL information */
for (i = 0; i < MISC5_DBGNELM1; i++)
@@ -957,7 +957,7 @@ test_misc5(void)
clear_struct1(&(((misc5_struct1 *)(buf.p))[j]));
/* Free the variable-length buffer */
- HDfree(buf.p);
+ free(buf.p);
/* Close dataset */
ret = H5Dclose(dataset_id);
@@ -1272,11 +1272,11 @@ test_misc8(void)
MESSAGE(5, ("Testing dataset storage sizes\n"));
/* Allocate space for the data to write & read */
- wdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK_PTR(wdata, "HDmalloc");
+ wdata = (int *)malloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
+ CHECK_PTR(wdata, "malloc");
#ifdef VERIFY_DATA
- rdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK_PTR(rdata, "HDmalloc");
+ rdata = (int *)malloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
+ CHECK_PTR(rdata, "malloc");
#endif /* VERIFY_DATA */
/* Initialize values */
@@ -1743,9 +1743,9 @@ test_misc8(void)
CHECK(ret, FAIL, "H5Fclose");
/* Free the read & write buffers */
- HDfree(wdata);
+ free(wdata);
#ifdef VERIFY_DATA
- HDfree(rdata);
+ free(rdata);
#endif /* VERIFY_DATA */
} /* end test_misc8() */
@@ -2208,8 +2208,8 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
herr_t ret; /* Generic return value */
/* Create a data buffer for the dataset read */
- read_data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
- CHECK_PTR(read_data, "HDcalloc");
+ read_data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(read_data, "calloc");
/* Open the contiguous dataset in the root group */
dsid = H5Dopen2(loc_id, name, H5P_DEFAULT);
@@ -2228,7 +2228,7 @@ misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
CHECK(ret, FAIL, "H5Dclose");
/* Free the dataset read buffer */
- HDfree(read_data);
+ free(read_data);
} /* end misc13_verify_dataset() */
@@ -2334,8 +2334,8 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
int ret; /* Generic status value */
/* Allocate space for the user block */
- user_block = HDcalloc(size, (size_t)1);
- CHECK_PTR(user_block, "HDcalloc");
+ user_block = calloc(size, (size_t)1);
+ CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
HDmemcpy(user_block, str, HDstrlen(str));
@@ -2353,8 +2353,8 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(old_fp, "HDfopen");
/* Allocate space for the copy buffer */
- copy_buf = HDmalloc((size_t)MISC13_COPY_BUF_SIZE);
- CHECK_PTR(copy_buf, "HDmalloc");
+ copy_buf = malloc((size_t)MISC13_COPY_BUF_SIZE);
+ CHECK_PTR(copy_buf, "malloc");
/* Copy data from the old file to the new file */
while ((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) {
@@ -2372,10 +2372,10 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
VERIFY(ret, 0, "HDfclose");
/* Free the copy buffer */
- HDfree(copy_buf);
+ free(copy_buf);
/* Free the user block */
- HDfree(user_block);
+ free(user_block);
} /* end misc13_insert_user_block() */
@@ -2503,8 +2503,8 @@ test_misc13(void)
hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
/* Create a data buffer for the datasets */
- data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
- CHECK_PTR(data, "HDcalloc");
+ data = (unsigned *)calloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(data, "calloc");
/* Initialize data to write */
misc13_init_data(data);
@@ -2534,7 +2534,7 @@ test_misc13(void)
misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Free the dataset buffer */
- HDfree(data);
+ free(data);
} /* end test_misc13() */
@@ -3640,7 +3640,7 @@ test_misc19(void)
H5E_END_TRY
VERIFY(ret, FAIL, "H5FDunregister");
- HDfree(vfd_cls);
+ free(vfd_cls);
/* Check H5I operations on virtual object connectors */
@@ -3680,7 +3680,7 @@ test_misc19(void)
H5E_END_TRY
VERIFY(ret, FAIL, "H5VLunregister_connector");
- HDfree(vol_cls);
+ free(vol_cls);
} /* end test_misc19() */
@@ -3888,8 +3888,8 @@ test_misc21(void)
MESSAGE(5, ("Testing late allocation time w/chunks & filters\n"));
/* Allocate space for the buffer */
- buf = (char *)HDcalloc(MISC21_SPACE_DIM0 * MISC21_SPACE_DIM1, 1);
- CHECK(buf, NULL, "HDcalloc");
+ buf = (char *)calloc(MISC21_SPACE_DIM0 * MISC21_SPACE_DIM1, 1);
+ CHECK(buf, NULL, "calloc");
/* Create the file */
fid = H5Fcreate(MISC21_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3929,7 +3929,7 @@ test_misc21(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc21() */
/****************************************************************
@@ -3973,8 +3973,8 @@ test_misc22(void)
MESSAGE(5, ("Testing datatypes with SZIP filter\n"));
/* Allocate space for the buffer */
- buf = (char *)HDcalloc(MISC22_SPACE_DIM0 * MISC22_SPACE_DIM1, 8);
- CHECK(buf, NULL, "HDcalloc");
+ buf = (char *)calloc(MISC22_SPACE_DIM0 * MISC22_SPACE_DIM1, 8);
+ CHECK(buf, NULL, "calloc");
/* Create the file */
fid = H5Fcreate(MISC22_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -4080,7 +4080,7 @@ test_misc22(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc22() */
#endif /* H5_HAVE_FILTER_SZIP */