summaryrefslogtreecommitdiffstats
path: root/test/tfile.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /test/tfile.c
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'test/tfile.c')
-rw-r--r--test/tfile.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/test/tfile.c b/test/tfile.c
index 0556b81..66ae7d7 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -1205,8 +1205,8 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, (NGROUPS + NDSETS + 1), "H5Fget_obj_count");
- oid_list = (hid_t *)HDcalloc((size_t)oid_list_size, sizeof(hid_t));
- CHECK_PTR(oid_list, "HDcalloc");
+ oid_list = (hid_t *)calloc((size_t)oid_list_size, sizeof(hid_t));
+ CHECK_PTR(oid_list, "calloc");
/* Call the public function H5F_get_obj_ids to use H5F__get_objects. User reported having problem here.
* that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in
@@ -1246,7 +1246,7 @@ test_get_obj_ids(void)
H5Sclose(filespace);
H5Fclose(fid);
- HDfree(oid_list);
+ free(oid_list);
/* Reopen the file to check whether H5Fget_obj_count and H5Fget_obj_ids still works
* when the file is closed first */
@@ -1268,8 +1268,8 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, NDSETS, "H5Fget_obj_count");
- oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
- CHECK_PTR(oid_list, "HDcalloc");
+ oid_list = (hid_t *)calloc((size_t)oid_count, sizeof(hid_t));
+ CHECK_PTR(oid_list, "calloc");
/* Get the list of all opened objects */
ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list);
@@ -1284,7 +1284,7 @@ test_get_obj_ids(void)
}
H5E_END_TRY;
- HDfree(oid_list);
+ free(oid_list);
}
/****************************************************************
@@ -1503,7 +1503,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, hid_t gid2,
if (oid_count > 0) {
hid_t *oid_list;
- oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
+ oid_list = (hid_t *)calloc((size_t)oid_count, sizeof(hid_t));
if (oid_list != NULL) {
int i;
@@ -1553,7 +1553,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, hid_t gid2,
} /* end switch */
} /* end for */
- HDfree(oid_list);
+ free(oid_list);
} /* end if */
} /* end if */
@@ -2795,7 +2795,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
CHECK(tid1, FAIL, "H5Tcopy");
/* Second file's dataset read */
- HDmemset(buffer, 0, sizeof(char *) * 5);
+ memset(buffer, 0, sizeof(char *) * 5);
ret = H5Dread(did2, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
CHECK(ret, FAIL, "H5Dread");
ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, buffer);
@@ -2810,7 +2810,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
CHECK(ret, FAIL, "H5Fclose");
/* First file's dataset read */
- HDmemset(buffer, 0, sizeof(char *) * 5);
+ memset(buffer, 0, sizeof(char *) * 5);
ret = H5Dread(did1, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
CHECK(ret, FAIL, "H5Dread");
ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, buffer);
@@ -3181,19 +3181,19 @@ cal_chksum(const char *file, uint32_t *chksum)
CHECK(fdes, FAIL, "HDfstat");
/* Allocate space for the file data */
- file_data = HDmalloc((size_t)sb.st_size);
- CHECK_PTR(file_data, "HDmalloc");
+ file_data = malloc((size_t)sb.st_size);
+ CHECK_PTR(file_data, "malloc");
if (file_data) {
/* Read file's data into memory */
bytes_read = HDread(fdes, file_data, (size_t)sb.st_size);
- CHECK(bytes_read == sb.st_size, FALSE, "HDmalloc");
+ CHECK(bytes_read == sb.st_size, FALSE, "malloc");
/* Calculate checksum */
*chksum = H5_checksum_lookup3(file_data, sizeof(file_data), 0);
/* Free memory */
- HDfree(file_data);
+ free(file_data);
}
/* Close the file */
@@ -4406,9 +4406,9 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
hbool_t relax;
H5FD_mem_t mt;
- HDassert(split);
+ assert(split);
- HDmemset(memb_name, 0, sizeof memb_name);
+ memset(memb_name, 0, sizeof memb_name);
/* Get current split settings */
if (H5Pget_fapl_multi(fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
@@ -4432,7 +4432,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- HDfree(memb_name[mt]);
+ free(memb_name[mt]);
return 0;
@@ -4756,7 +4756,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(nsects, FAIL, "H5Fget_free_sections");
/* Retrieve and verify free space info for all the sections */
- HDmemset(all_sect_info, 0, sizeof(all_sect_info));
+ memset(all_sect_info, 0, sizeof(all_sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)nall, all_sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4769,7 +4769,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
last_size = all_sect_info[nall - 1].size;
/* Retrieve and verify free space info for -1 sections */
- HDmemset(sect_info, 0, sizeof(sect_info));
+ memset(sect_info, 0, sizeof(sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)(nall - 1), sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4783,7 +4783,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(((hsize_t)free_space - last_size), total, "H5Fget_free_sections");
/* Retrieve and verify free-space info for +1 sections */
- HDmemset(sect_info, 0, sizeof(sect_info));
+ memset(sect_info, 0, sizeof(sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)(nall + 1), sect_info);
VERIFY(nsects, nall, "H5Fget_free_sections");
@@ -4798,7 +4798,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
VERIFY(sect_info[nall].size, 0, "H5Fget_free_sections");
VERIFY(free_space, total, "H5Fget_free_sections");
- HDmemset(meta_sect_info, 0, sizeof(meta_sect_info));
+ memset(meta_sect_info, 0, sizeof(meta_sect_info));
if (multi_vfd) {
hssize_t ntmp;
@@ -4831,7 +4831,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
CHECK(nraw, FAIL, "H5Fget_free_sections");
/* Retrieve and verify free-space sections for raw data */
- HDmemset(raw_sect_info, 0, sizeof(raw_sect_info));
+ memset(raw_sect_info, 0, sizeof(raw_sect_info));
nsects = H5Fget_free_sections(file, H5FD_MEM_DRAW, (size_t)nraw, raw_sect_info);
VERIFY(nsects, nraw, "H5Fget_free_sections");
@@ -5631,7 +5631,7 @@ test_libver_bounds_copy(void)
CHECK_I(ret, "h5_driver_is_default_vfd_compatible");
if (!driver_is_default_compatible) {
- HDprintf("-- SKIPPED --\n");
+ printf("-- SKIPPED --\n");
return;
}