summaryrefslogtreecommitdiffstats
path: root/test/API/tmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/API/tmisc.c')
-rw-r--r--test/API/tmisc.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/test/API/tmisc.c b/test/API/tmisc.c
index 4696bda..eb827a2 100644
--- a/test/API/tmisc.c
+++ b/test/API/tmisc.c
@@ -568,8 +568,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
@@ -782,7 +782,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));
@@ -808,7 +808,7 @@ delete_struct3(misc5_struct3_hndl *str3hndl)
ret = H5Tclose(str3hndl->st3h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str3hndl);
+ free(str3hndl);
}
static void
@@ -825,8 +825,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");
@@ -860,7 +860,7 @@ delete_struct2(misc5_struct2_hndl *str2hndl)
H5Tclose(str2hndl->st2h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str2hndl);
+ free(str2hndl);
}
static void
@@ -871,8 +871,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]));
@@ -881,7 +881,7 @@ set_struct2(misc5_struct2 *buf)
static void
clear_struct2(misc5_struct2 *buf)
{
- HDfree(buf->st2_el2.p);
+ free(buf->st2_el2.p);
}
/*********************** struct1 ***********************/
@@ -892,8 +892,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");
@@ -927,7 +927,7 @@ delete_struct1(misc5_struct1_hndl *str1hndl)
ret = H5Tclose(str1hndl->st1h_base);
CHECK(ret, FAIL, "H5Tclose");
- HDfree(str1hndl);
+ free(str1hndl);
}
static void
@@ -938,8 +938,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]));
@@ -952,7 +952,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
@@ -989,8 +989,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++)
@@ -1005,7 +1005,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);
@@ -1323,11 +1323,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 */
@@ -1794,9 +1794,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() */
#endif
@@ -2264,8 +2264,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);
@@ -2284,7 +2284,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() */
@@ -2390,8 +2390,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));
@@ -2409,8 +2409,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) {
@@ -2428,10 +2428,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() */
@@ -2559,8 +2559,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);
@@ -2590,7 +2590,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() */
#endif
@@ -3718,7 +3718,7 @@ test_misc19(void)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5FDunregister");
- HDfree(vfd_cls);
+ free(vfd_cls);
/* Check H5I operations on virtual object connectors */
@@ -3758,7 +3758,7 @@ test_misc19(void)
H5E_END_TRY;
VERIFY(ret, FAIL, "H5VLunregister_connector");
- HDfree(vol_cls);
+ free(vol_cls);
#endif
} /* end test_misc19() */
@@ -3968,8 +3968,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);
@@ -4009,7 +4009,7 @@ test_misc21(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc21() */
/****************************************************************
@@ -4053,8 +4053,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);
@@ -4160,7 +4160,7 @@ test_misc22(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- HDfree(buf);
+ free(buf);
} /* end test_misc22() */
#endif /* H5_HAVE_FILTER_SZIP */