diff options
Diffstat (limited to 'test/onion.c')
-rw-r--r-- | test/onion.c | 230 |
1 files changed, 115 insertions, 115 deletions
diff --git a/test/onion.c b/test/onion.c index d87958e..d54b539 100644 --- a/test/onion.c +++ b/test/onion.c @@ -112,21 +112,21 @@ onion_filepaths_init(const char *basename) { struct onion_filepaths *paths = NULL; - if (NULL == (paths = HDmalloc(sizeof(struct onion_filepaths)))) + if (NULL == (paths = malloc(sizeof(struct onion_filepaths)))) TEST_ERROR; paths->canon = NULL; paths->onion = NULL; paths->recovery = NULL; - if (NULL == (paths->canon = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) + if (NULL == (paths->canon = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) TEST_ERROR; HDsnprintf(paths->canon, ONION_TEST_FIXNAME_SIZE, "%s", basename); - if (NULL == (paths->onion = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) + if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) TEST_ERROR; HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon); - if (NULL == (paths->recovery = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) + if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) TEST_ERROR; HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon); @@ -134,11 +134,11 @@ onion_filepaths_init(const char *basename) error: if (paths != NULL) { - HDfree(paths->canon); - HDfree(paths->onion); - HDfree(paths->recovery); + free(paths->canon); + free(paths->onion); + free(paths->recovery); } - HDfree(paths); + free(paths); return NULL; } @@ -147,10 +147,10 @@ error: static void onion_filepaths_destroy(struct onion_filepaths *paths) { - HDfree(paths->canon); - HDfree(paths->onion); - HDfree(paths->recovery); - HDfree(paths); + free(paths->canon); + free(paths->onion); + free(paths->recovery); + free(paths); } /*----------------------------------------------------------------------------- @@ -1156,7 +1156,7 @@ test_history_encode_decode(void) if (80 != exp_size) TEST_ERROR; - history.record_locs = HDcalloc(history.n_revisions, sizeof(H5FD_onion_record_loc_t)); + history.record_locs = calloc(history.n_revisions, sizeof(H5FD_onion_record_loc_t)); if (NULL == history.record_locs) TEST_ERROR; @@ -1185,7 +1185,7 @@ test_history_encode_decode(void) buf_p = exp + exp_size - 4; UINT32ENCODE(buf_p, history.checksum); - if (NULL == (buf = HDmalloc(exp_size))) + if (NULL == (buf = malloc(exp_size))) TEST_ERROR; if (H5FD__onion_history_encode(&history, buf, &checksum_out) != exp_size) @@ -1212,7 +1212,7 @@ test_history_encode_decode(void) /* True decode requires allocating space for record pointers */ - history_out.record_locs = HDcalloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t)); + history_out.record_locs = calloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t)); if (NULL == history_out.record_locs) TEST_ERROR; @@ -1238,17 +1238,17 @@ test_history_encode_decode(void) TEST_ERROR; } - HDfree(history_out.record_locs); - HDfree(buf); - HDfree(history.record_locs); + free(history_out.record_locs); + free(buf); + free(history.record_locs); PASSED(); return 0; error: - HDfree(history_out.record_locs); - HDfree(buf); - HDfree(history.record_locs); + free(history_out.record_locs); + free(buf); + free(history.record_locs); return -1; } /* end test_history_encode_decode() */ @@ -1336,7 +1336,7 @@ test_revision_record_encode_decode(void) TESTING("encode/decode revision record"); HDmemcpy(record.time_of_creation, "19411207T190643Z", 16); - record.archival_index.list = HDcalloc(record.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t)); + record.archival_index.list = calloc(record.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t)); if (NULL == record.archival_index.list) TEST_ERROR; @@ -1376,7 +1376,7 @@ test_revision_record_encode_decode(void) r_out.archival_index.n_entries = 0; r_out.archival_index.list = NULL; - if (NULL == (buf = HDmalloc(sizeof(unsigned char) * exp_size))) + if (NULL == (buf = malloc(sizeof(unsigned char) * exp_size))) TEST_ERROR; /* Test encode */ @@ -1459,10 +1459,10 @@ test_revision_record_encode_decode(void) TEST_ERROR; /* Allocate variable-length components */ - r_out.comment = HDcalloc(r_out.comment_size, sizeof(char)); + r_out.comment = calloc(r_out.comment_size, sizeof(char)); if (NULL == r_out.comment) TEST_ERROR; - r_out.archival_index.list = HDcalloc(r_out.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t)); + r_out.archival_index.list = calloc(r_out.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t)); if (NULL == r_out.archival_index.list) TEST_ERROR; @@ -1508,19 +1508,19 @@ test_revision_record_encode_decode(void) /* Cleanup */ - HDfree(r_out.archival_index.list); - HDfree(r_out.comment); - HDfree(buf); - HDfree(record.archival_index.list); + free(r_out.archival_index.list); + free(r_out.comment); + free(buf); + free(record.archival_index.list); PASSED(); return 0; error: - HDfree(r_out.archival_index.list); - HDfree(r_out.comment); - HDfree(buf); - HDfree(record.archival_index.list); + free(r_out.archival_index.list); + free(r_out.comment); + free(buf); + free(record.archival_index.list); return -1; } /* end test_revision_record_encode_decode() */ @@ -1549,7 +1549,7 @@ compare_file_bytes_exactly(const char *filepath, hid_t fapl_id, size_t nbytes, c TEST_ERROR; } - if (NULL == (act_buf = HDmalloc(nbytes))) + if (NULL == (act_buf = malloc(nbytes))) TEST_ERROR; /* Fill buffer with bogus UCHAR_MAX values */ for (size_t i = 0; i < nbytes; i++) @@ -1569,14 +1569,14 @@ compare_file_bytes_exactly(const char *filepath, hid_t fapl_id, size_t nbytes, c if (H5FDclose(raw_vfile) < 0) TEST_ERROR; - HDfree(act_buf); + free(act_buf); return 0; error: if (raw_vfile != NULL) H5FDclose(raw_vfile); - HDfree(act_buf); + free(act_buf); return -1; } /* end compare_file_bytes_exactly() */ @@ -1621,7 +1621,7 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt /* Ingest onion header */ readsize = MIN(filesize, H5FD_ONION_ENCODED_SIZE_HEADER); - if (NULL == (buf = HDmalloc(readsize * sizeof(unsigned char)))) + if (NULL == (buf = malloc(readsize * sizeof(unsigned char)))) TEST_ERROR; if (H5FDread(raw_file, H5FD_MEM_DRAW, H5P_DEFAULT, 0, readsize, buf) < 0) TEST_ERROR; @@ -1645,13 +1645,13 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt if (filter->origin_eof != hdr_out.origin_eof) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; /* Ingest history */ readsize = hdr_out.history_size; - if (NULL == (buf = HDmalloc(readsize * sizeof(unsigned char)))) + if (NULL == (buf = malloc(readsize * sizeof(unsigned char)))) TEST_ERROR; if (H5FDread(raw_file, H5FD_MEM_DRAW, H5P_DEFAULT, hdr_out.history_addr, readsize, buf) < 0) TEST_ERROR; @@ -1673,7 +1673,7 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt TEST_ERROR; /* Final read, populate pointers to revision records */ - history_out.record_locs = HDcalloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t)); + history_out.record_locs = calloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t)); if (NULL == history_out.record_locs) TEST_ERROR; if (H5FD__onion_history_decode(buf, &history_out) != readsize) @@ -1706,7 +1706,7 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt TEST_ERROR; } - HDfree(buf); + free(buf); buf = NULL; /* Ingest revision(s) */ @@ -1722,7 +1722,7 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt rev_out.comment = NULL; readsize = rpp->record_size; - if (NULL == (buf = HDmalloc((size_t)rpp->record_size))) + if (NULL == (buf = malloc((size_t)rpp->record_size))) TEST_ERROR; if (H5FDread(raw_file, H5FD_MEM_DRAW, H5P_DEFAULT, rpp->phys_addr, rpp->record_size, buf) < 0) TEST_ERROR; @@ -1750,10 +1750,10 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt TEST_ERROR; /* Final read, get variable-length data */ - if (NULL == (rev_out.comment = HDmalloc((size_t)rev_out.comment_size))) + if (NULL == (rev_out.comment = malloc((size_t)rev_out.comment_size))) TEST_ERROR; rev_out.archival_index.list = - HDcalloc(rev_out.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t)); + calloc(rev_out.archival_index.n_entries, sizeof(H5FD_onion_index_entry_t)); if (NULL == rev_out.archival_index.list) TEST_ERROR; @@ -1776,21 +1776,21 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt erp->n_index_entries != rev_out.archival_index.n_entries) TEST_ERROR; - HDfree(buf); - HDfree(rev_out.comment); - HDfree(rev_out.archival_index.list); + free(buf); + free(rev_out.comment); + free(rev_out.archival_index.list); } - HDfree(history_out.record_locs); + free(history_out.record_locs); history_out.record_locs = NULL; return 0; error: - HDfree(buf); - HDfree(rev_out.comment); - HDfree(rev_out.archival_index.list); - HDfree(history_out.record_locs); + free(buf); + free(rev_out.comment); + free(rev_out.archival_index.list); + free(history_out.record_locs); return -1; @@ -1851,7 +1851,7 @@ verify_stored_onion_create_0_open(struct onion_filepaths *paths, H5FD_onion_fapl TEST_ERROR; /* Size here is arbitrary */ - if (NULL == (act_buf = HDcalloc(1, 8))) + if (NULL == (act_buf = calloc(1, 8))) TEST_ERROR; /* Should fail when reading from an empty file */ @@ -1863,7 +1863,7 @@ verify_stored_onion_create_0_open(struct onion_filepaths *paths, H5FD_onion_fapl if (err_ret != FAIL) TEST_ERROR; - HDfree(act_buf); + free(act_buf); act_buf = NULL; if (H5FDclose(file) < 0) @@ -1887,7 +1887,7 @@ verify_stored_onion_create_0_open(struct onion_filepaths *paths, H5FD_onion_fapl error: if (file != NULL) (void)H5FDclose(file); - HDfree(act_buf); + free(act_buf); return -1; } /* end verify_stored_onion_create_0_open() */ @@ -2032,13 +2032,13 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data) } /* Verify logical file contents. */ - if (NULL == (buf = HDmalloc(4 * sizeof(char)))) + if (NULL == (buf = malloc(4 * sizeof(char)))) TEST_ERROR; if (H5FDread(vfile_rw, H5FD_MEM_DRAW, H5P_DEFAULT, 0, 4, buf) < 0) TEST_ERROR; if (HDmemcmp(a_list_s, buf, 4) != 0) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; /* Write the latter half of buffer at addr 0 (more than one page) */ @@ -2052,13 +2052,13 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data) TEST_ERROR; /* Verify logical file contents. */ - if (NULL == (buf = HDmalloc(buf_size * sizeof(char)))) + if (NULL == (buf = malloc(buf_size * sizeof(char)))) TEST_ERROR; if (H5FDread(vfile_rw, H5FD_MEM_DRAW, H5P_DEFAULT, 0, buf_size, buf) < 0) TEST_ERROR; if (HDmemcmp(a_list_s + half_size, buf, buf_size) != 0) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; /* Overwrite existing data with entire buffer at addr 0 */ @@ -2068,13 +2068,13 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data) TEST_ERROR; /* Verify logical file contents. */ - if (NULL == (buf = HDmalloc(a_list_size_s * sizeof(char)))) + if (NULL == (buf = malloc(a_list_size_s * sizeof(char)))) TEST_ERROR; if (H5FDread(vfile_rw, H5FD_MEM_DRAW, H5P_DEFAULT, 0, a_list_size_s, buf) < 0) TEST_ERROR; if (HDmemcmp(a_list_s, buf, a_list_size_s) != 0) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; } /* end if writing data to logical file */ @@ -2135,13 +2135,13 @@ test_create_oniontarget(hbool_t truncate_canonical, hbool_t with_initial_data) TEST_ERROR; if (H5FDset_eoa(vfile_ro, H5FD_MEM_DRAW, a_list_size_s) < 0) TEST_ERROR; - if (NULL == (buf = HDmalloc(a_list_size_s * 64 * sizeof(char)))) + if (NULL == (buf = malloc(a_list_size_s * 64 * sizeof(char)))) TEST_ERROR; if (H5FDread(vfile_ro, H5FD_MEM_DRAW, H5P_DEFAULT, 0, a_list_size_s, buf) < 0) TEST_ERROR; if (HDmemcmp(a_list_s, buf, a_list_size_s) != 0) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; } else { @@ -2180,7 +2180,7 @@ error: onion_filepaths_destroy(paths); } - HDfree(buf); + free(buf); if (vfile_raw != NULL) (void)H5FDclose(vfile_raw); @@ -2356,7 +2356,7 @@ test_several_revisions_with_logical_gaps(void) H5FDget_eof(file, H5FD_MEM_DRAW)); TEST_ERROR; } - if (NULL == (buf = HDmalloc(size * sizeof(unsigned char)))) + if (NULL == (buf = malloc(size * sizeof(unsigned char)))) TEST_ERROR; if (H5FDset_eoa(file, H5FD_MEM_DRAW, size) < 0) TEST_ERROR; @@ -2368,10 +2368,10 @@ test_several_revisions_with_logical_gaps(void) } if (HDmemcmp(buf + a_off, a_list_s, a_list_size_s) != 0) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; /* Repeat read at page offset; test possible read offset error */ - if (NULL == (buf = HDmalloc(ONION_TEST_PAGE_SIZE_5 * sizeof(unsigned char)))) + if (NULL == (buf = malloc(ONION_TEST_PAGE_SIZE_5 * sizeof(unsigned char)))) TEST_ERROR; if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, ONION_TEST_PAGE_SIZE_5, ONION_TEST_PAGE_SIZE_5, buf) < 0) TEST_ERROR; @@ -2382,7 +2382,7 @@ test_several_revisions_with_logical_gaps(void) } if (HDmemcmp(buf + size, a_list_s, ONION_TEST_PAGE_SIZE_5 - size) != 0) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; if (H5FDclose(file) < 0) TEST_ERROR; @@ -2404,7 +2404,7 @@ test_several_revisions_with_logical_gaps(void) size = b_off + b_list_size_s; if (size != H5FDget_eof(file, H5FD_MEM_DRAW)) TEST_ERROR; - if (NULL == (buf = HDmalloc(size * sizeof(unsigned char)))) + if (NULL == (buf = malloc(size * sizeof(unsigned char)))) TEST_ERROR; if (H5FDset_eoa(file, H5FD_MEM_DRAW, size) < 0) TEST_ERROR; @@ -2422,7 +2422,7 @@ test_several_revisions_with_logical_gaps(void) } if (HDmemcmp(buf + b_off, b_list_s, b_list_size_s) != 0) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; if (H5FDclose(file) < 0) TEST_ERROR; @@ -2444,7 +2444,7 @@ test_several_revisions_with_logical_gaps(void) size = b_off + b_list_size_s; if (size != H5FDget_eof(file, H5FD_MEM_DRAW)) TEST_ERROR; - buf = (unsigned char *)HDmalloc(sizeof(unsigned char) * size); + buf = (unsigned char *)malloc(sizeof(unsigned char) * size); if (NULL == buf) TEST_ERROR; if (H5FDset_eoa(file, H5FD_MEM_DRAW, size) < 0) @@ -2461,7 +2461,7 @@ test_several_revisions_with_logical_gaps(void) } if (HDmemcmp(buf + b_off, b_list_s, b_list_size_s) != 0) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; if (H5FDclose(file) < 0) TEST_ERROR; @@ -2536,8 +2536,8 @@ error: onion_filepaths_destroy(paths); } - HDfree(history_out.record_locs); - HDfree(buf); + free(history_out.record_locs); + free(buf); if (file != NULL) (void)H5FDclose(file); @@ -2609,7 +2609,7 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf if (H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, wi->offset, wi->size, wi->buf) < 0) TEST_ERROR; /* Verify write as expected */ - if (NULL == (buf_vfy = HDmalloc(wi->size * sizeof(unsigned char)))) + if (NULL == (buf_vfy = malloc(wi->size * sizeof(unsigned char)))) TEST_ERROR; if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, wi->offset, wi->size, buf_vfy) < 0) TEST_ERROR; @@ -2622,7 +2622,7 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf HDfflush(stdout); TEST_ERROR; } - HDfree(buf_vfy); + free(buf_vfy); buf_vfy = NULL; } /* end for each write */ @@ -2646,7 +2646,7 @@ error: } H5E_END_TRY - HDfree(buf_vfy); + free(buf_vfy); return -1; } /* end do_onion_open_and_writes() */ @@ -2733,7 +2733,7 @@ test_page_aligned_history_create(void) TEST_ERROR; /* Inspect logical file */ - if (NULL == (buf = HDmalloc(b_list_size_s * sizeof(unsigned char)))) + if (NULL == (buf = malloc(b_list_size_s * sizeof(unsigned char)))) TEST_ERROR; file = H5FDopen(paths->canon, H5F_ACC_RDONLY, fapl_id, HADDR_UNDEF); if (NULL == file) @@ -2767,7 +2767,7 @@ test_page_aligned_history_create(void) if (H5FDclose(file) < 0) TEST_ERROR; file = NULL; - HDfree(buf); + free(buf); buf = NULL; /* Inspect history construction */ @@ -2777,7 +2777,7 @@ test_page_aligned_history_create(void) if (H5FDset_eoa(file, H5FD_MEM_DRAW, H5FDget_eof(file, H5FD_MEM_DRAW)) < 0) TEST_ERROR; - if (NULL == (buf = HDmalloc(H5FD_ONION_ENCODED_SIZE_HEADER))) + if (NULL == (buf = malloc(H5FD_ONION_ENCODED_SIZE_HEADER))) TEST_ERROR; if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, 0, H5FD_ONION_ENCODED_SIZE_HEADER, buf) < 0) TEST_ERROR; @@ -2785,10 +2785,10 @@ test_page_aligned_history_create(void) TEST_ERROR; if (hdr_out.history_addr & ((1 << 5) - 1)) /* 5::PAGE_SIZE_5 */ TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; - if (NULL == (buf = HDmalloc(hdr_out.history_size))) + if (NULL == (buf = malloc(hdr_out.history_size))) TEST_ERROR; if (H5FDread(file, H5FD_MEM_DRAW, H5P_DEFAULT, hdr_out.history_addr, hdr_out.history_size, buf) < 0) TEST_ERROR; @@ -2796,12 +2796,12 @@ test_page_aligned_history_create(void) TEST_ERROR; if (history_out.n_revisions != 2) TEST_ERROR; - history_out.record_locs = HDcalloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t)); + history_out.record_locs = calloc(history_out.n_revisions, sizeof(H5FD_onion_record_loc_t)); if (NULL == history_out.record_locs) TEST_ERROR; if (H5FD__onion_history_decode(buf, &history_out) != hdr_out.history_size) TEST_ERROR; - HDfree(buf); + free(buf); buf = NULL; for (i = 0; i < history_out.n_revisions; i++) { @@ -2811,7 +2811,7 @@ test_page_aligned_history_create(void) /* TODO: check phys_addr of each page entry? */ } - HDfree(history_out.record_locs); + free(history_out.record_locs); history_out.record_locs = NULL; if (H5FDclose(file) < 0) @@ -2830,7 +2830,7 @@ test_page_aligned_history_create(void) HDremove(paths->recovery); onion_filepaths_destroy(paths); - HDfree(buf); + free(buf); PASSED(); return 0; @@ -2844,8 +2844,8 @@ error: onion_filepaths_destroy(paths); } - HDfree(history_out.record_locs); - HDfree(buf); + free(history_out.record_locs); + free(buf); if (file != NULL) (void)H5FDclose(file); @@ -2908,11 +2908,11 @@ test_integration_create(void) /* SETUP */ - if (NULL == (wdata = HDcalloc(1, sizeof(*wdata)))) + if (NULL == (wdata = calloc(1, sizeof(*wdata)))) TEST_ERROR; - if (NULL == (rdata = HDcalloc(1, sizeof(*rdata)))) + if (NULL == (rdata = calloc(1, sizeof(*rdata)))) TEST_ERROR; - if (NULL == (dset_data = HDcalloc(1, sizeof(*dset_data)))) + if (NULL == (dset_data = calloc(1, sizeof(*dset_data)))) TEST_ERROR; if ((onion_info.backing_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -3168,9 +3168,9 @@ test_integration_create(void) HDremove(paths->recovery); onion_filepaths_destroy(paths); - HDfree(wdata); - HDfree(rdata); - HDfree(dset_data); + free(wdata); + free(rdata); + free(dset_data); PASSED(); return 0; @@ -3193,9 +3193,9 @@ error: } H5E_END_TRY - HDfree(wdata); - HDfree(rdata); - HDfree(dset_data); + free(wdata); + free(rdata); + free(dset_data); return -1; } /* end test_integration_create() */ @@ -3237,11 +3237,11 @@ test_integration_create_simple(void) TESTING("onion-created one-dimensional HDF5 file with revisions"); /* Setup */ - if (NULL == (wdata = HDcalloc(1, sizeof(*wdata)))) + if (NULL == (wdata = calloc(1, sizeof(*wdata)))) TEST_ERROR; - if (NULL == (rdata = HDcalloc(1, sizeof(*rdata)))) + if (NULL == (rdata = calloc(1, sizeof(*rdata)))) TEST_ERROR; - if (NULL == (dset_data = HDcalloc(1, sizeof(*dset_data)))) + if (NULL == (dset_data = calloc(1, sizeof(*dset_data)))) TEST_ERROR; if ((onion_info.backing_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -3427,9 +3427,9 @@ test_integration_create_simple(void) HDremove(paths->recovery); onion_filepaths_destroy(paths); - HDfree(wdata); - HDfree(rdata); - HDfree(dset_data); + free(wdata); + free(rdata); + free(dset_data); PASSED(); return 0; @@ -3452,9 +3452,9 @@ error: } H5E_END_TRY - HDfree(wdata); - HDfree(rdata); - HDfree(dset_data); + free(wdata); + free(rdata); + free(dset_data); return -1; } /* end test_integration_create_simple() */ @@ -4681,11 +4681,11 @@ test_integration_create_by_name(void) TESTING("H5Pset_driver_by_name"); /* Setup */ - if (NULL == (wdata = HDcalloc(1, sizeof(*wdata)))) + if (NULL == (wdata = calloc(1, sizeof(*wdata)))) TEST_ERROR; - if (NULL == (rdata = HDcalloc(1, sizeof(*rdata)))) + if (NULL == (rdata = calloc(1, sizeof(*rdata)))) TEST_ERROR; - if (NULL == (dset_data = HDcalloc(1, sizeof(*dset_data)))) + if (NULL == (dset_data = calloc(1, sizeof(*dset_data)))) TEST_ERROR; if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -4867,9 +4867,9 @@ test_integration_create_by_name(void) HDremove(paths->recovery); onion_filepaths_destroy(paths); - HDfree(wdata); - HDfree(rdata); - HDfree(dset_data); + free(wdata); + free(rdata); + free(dset_data); PASSED(); return 0; @@ -4891,9 +4891,9 @@ error: } H5E_END_TRY - HDfree(wdata); - HDfree(rdata); - HDfree(dset_data); + free(wdata); + free(rdata); + free(dset_data); return -1; } /* end test_integration_create_simple() */ |