diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /test/objcopy_ref.c | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'test/objcopy_ref.c')
-rw-r--r-- | test/objcopy_ref.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c index ebce96b..98098a8 100644 --- a/test/objcopy_ref.c +++ b/test/objcopy_ref.c @@ -105,7 +105,7 @@ token_insert(H5O_info2_t *oinfo) /* Extend the table */ if (idtab_g.nobjs >= idtab_g.nalloc) { idtab_g.nalloc = MAX(256, 2 * idtab_g.nalloc); - idtab_g.obj = (H5O_token_t *)HDrealloc(idtab_g.obj, idtab_g.nalloc * sizeof(idtab_g.obj[0])); + idtab_g.obj = (H5O_token_t *)realloc(idtab_g.obj, idtab_g.nalloc * sizeof(idtab_g.obj[0])); } /* Insert the entry */ @@ -161,7 +161,7 @@ static void token_reset(void) { if (idtab_g.obj) - HDfree(idtab_g.obj); + free(idtab_g.obj); idtab_g.obj = NULL; idtab_g.nalloc = idtab_g.nobjs = 0; } /* end token_reset() */ @@ -635,9 +635,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_ /* Check the raw data is equal */ /* Allocate & initialize space for the raw data buffers */ - if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL) + if ((rbuf = calloc(elmt_size, (size_t)nelmts)) == NULL) TEST_ERROR; - if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL) + if ((rbuf2 = calloc(elmt_size, (size_t)nelmts)) == NULL) TEST_ERROR; /* Read data from the source attribute */ @@ -668,9 +668,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_ TEST_ERROR; /* Release raw data buffers */ - HDfree(rbuf); + free(rbuf); rbuf = NULL; - HDfree(rbuf2); + free(rbuf2); rbuf2 = NULL; /* close the source dataspace */ @@ -693,9 +693,9 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_ error: if (rbuf) - HDfree(rbuf); + free(rbuf); if (rbuf2) - HDfree(rbuf2); + free(rbuf2); H5E_BEGIN_TRY { H5Sclose(sid2); @@ -882,11 +882,11 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, else { /* vlens cannot currently be nested below the top layer of a * compound */ - HDassert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE); + assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE); /* Iterate over all elements, calling memcmp() for each */ for (elmt = 0; elmt < nelmts; elmt++) { - if (HDmemcmp(memb1, memb2, memb_size) != 0) + if (memcmp(memb1, memb2, memb_size) != 0) TEST_ERROR; /* Update member pointers */ @@ -1036,7 +1036,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, else TEST_ERROR; } /* end else */ - else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0) + else if (memcmp(buf1, buf2, (elmt_size * nelmts)) != 0) TEST_ERROR; /* Data should be the same. :-) */ @@ -1172,9 +1172,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf) /* Check the raw data is equal */ /* Allocate & initialize space for the raw data buffers */ - if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL) + if ((rbuf = calloc(elmt_size, (size_t)nelmts)) == NULL) TEST_ERROR; - if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL) + if ((rbuf2 = calloc(elmt_size, (size_t)nelmts)) == NULL) TEST_ERROR; /* Read data from datasets */ @@ -1203,9 +1203,9 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf) TEST_ERROR; /* Release raw data buffers */ - HDfree(rbuf); + free(rbuf); rbuf = NULL; - HDfree(rbuf2); + free(rbuf2); rbuf2 = NULL; /* close the source dataspace */ @@ -1235,9 +1235,9 @@ error: H5E_BEGIN_TRY { if (rbuf) - HDfree(rbuf); + free(rbuf); if (rbuf2) - HDfree(rbuf2); + free(rbuf2); H5Pclose(dcpl2); H5Pclose(dcpl); H5Sclose(sid2); @@ -1387,7 +1387,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) break; case H5O_TYPE_MAP: - HDassert(0 && "maps not supported in native VOL connector"); + assert(0 && "maps not supported in native VOL connector"); /* clang complains about implicit fallthrough here and * our usual attributes and fall-through comments don't @@ -1397,7 +1397,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: default: - HDassert(0 && "Unknown type of object"); + assert(0 && "Unknown type of object"); break; H5_CLANG_DIAG_ON("implicit-fallthrough") } /* end switch */ @@ -1420,18 +1420,18 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) char linkval2[NAME_BUF_SIZE]; /* Link value */ /* Get link values */ - HDassert(linfo.u.val_size <= NAME_BUF_SIZE); + assert(linfo.u.val_size <= NAME_BUF_SIZE); if (H5Lget_val(gid, objname, linkval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR; if (H5Lget_val(gid2, objname2, linkval2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR; /* Compare link data */ - if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0) + if (memcmp(linkval, linkval2, linfo.u.val_size) != 0) TEST_ERROR; } /* end else-if */ else { - HDassert(0 && "Unknown type of link"); + assert(0 && "Unknown type of link"); } /* end else */ } /* end else */ } /* end for */ @@ -1867,7 +1867,7 @@ main(void) ExpressMode = GetTestExpress(); if (ExpressMode > 1) - HDprintf("***Express test mode on. Some tests may be skipped\n"); + printf("***Express test mode on. Some tests may be skipped\n"); /* Copy the file access property list */ if ((fapl2 = H5Pcopy(fapl)) < 0) @@ -1971,8 +1971,8 @@ main(void) /* Results */ if (nerrors) { - HDprintf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S")); - HDexit(EXIT_FAILURE); + printf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S")); + exit(EXIT_FAILURE); } /* end if */ HDputs("All object copying tests passed."); @@ -2002,8 +2002,8 @@ main(void) h5_cleanup(FILENAME, fapl); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* main */ |