diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-15 22:13:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 22:13:18 (GMT) |
commit | 44a00ef876ad3e1922847e93feac57c479217fbe (patch) | |
tree | 5e9fc677913a06a71eba1342633f92e93bd07a6c /test/dtransform.c | |
parent | 59a90368cdb696205bdf15040d1a48b4f69af97f (diff) | |
download | hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.zip hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.gz hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.bz2 |
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls
* HD(f)(put|get)(s|c)
* HDstr*
* HDv*printf
* HD(s)(print|scan)f
* HDperror
But NOT:
* HDstrcase*
* HDvasprintf
* HDstrtok_r
* HDstrndup
As those are not C99 and have portability work-around
implementations. They will be handled later.
* Fix th5_system.c screwup
Diffstat (limited to 'test/dtransform.c')
-rw-r--r-- | test/dtransform.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/dtransform.c b/test/dtransform.c index c0d92dd..6ec48a6 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -857,12 +857,12 @@ test_getset(const hid_t dxpl_id_c_to_f) TESTING("H5Pget_data_transform"); - if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(simple) + 1))) + if (NULL == (ptrgetTest = (char *)malloc(strlen(simple) + 1))) TEST_ERROR; - if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(c_to_f) + 1) < 0) + if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(c_to_f) + 1) < 0) TEST_ERROR; - if (HDstrcmp(c_to_f, ptrgetTest) != 0) + if (strcmp(c_to_f, ptrgetTest) != 0) FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n"); PASSED(); @@ -888,11 +888,11 @@ test_getset(const hid_t dxpl_id_c_to_f) TESTING("H5Pget_data_transform, after resetting transform property"); - if (NULL == (ptrgetTest = (char *)calloc((size_t)1, HDstrlen(simple) + 1))) + if (NULL == (ptrgetTest = (char *)calloc((size_t)1, strlen(simple) + 1))) TEST_ERROR; - if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(simple) + 1) < 0) + if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(simple) + 1) < 0) TEST_ERROR; - if (HDstrcmp(simple, ptrgetTest) != 0) + if (strcmp(simple, ptrgetTest) != 0) FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n"); PASSED(); @@ -919,7 +919,7 @@ test_set(void) TESTING("H5Pget_data_transform (get before set)"); - if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(str) + 1))) + if (NULL == (ptrgetTest = (char *)malloc(strlen(str) + 1))) TEST_ERROR; if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) @@ -930,7 +930,7 @@ test_set(void) H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - if (H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0) + if (H5Pget_data_transform(dxpl_id, ptrgetTest, strlen(str) + 1) < 0) PASSED(); else FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n"); |