summaryrefslogtreecommitdiffstats
path: root/test/error_test.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-15 22:13:18 (GMT)
committerGitHub <noreply@github.com>2023-09-15 22:13:18 (GMT)
commit44a00ef876ad3e1922847e93feac57c479217fbe (patch)
tree5e9fc677913a06a71eba1342633f92e93bd07a6c /test/error_test.c
parent59a90368cdb696205bdf15040d1a48b4f69af97f (diff)
downloadhdf5-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/error_test.c')
-rw-r--r--test/error_test.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/error_test.c b/test/error_test.c
index b1c45ef..9fe8117 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -175,15 +175,15 @@ error:
static herr_t
init_error(void)
{
- ssize_t cls_size = (ssize_t)HDstrlen(ERR_CLS_NAME) + 1;
- ssize_t msg_size = (ssize_t)HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1;
+ ssize_t cls_size = (ssize_t)strlen(ERR_CLS_NAME) + 1;
+ ssize_t msg_size = (ssize_t)strlen(ERR_MIN_SUBROUTINE_MSG) + 1;
char *cls_name = NULL;
char *msg = NULL;
H5E_type_t msg_type;
- if (NULL == (cls_name = (char *)malloc(HDstrlen(ERR_CLS_NAME) + 1)))
+ if (NULL == (cls_name = (char *)malloc(strlen(ERR_CLS_NAME) + 1)))
TEST_ERROR;
- if (NULL == (msg = (char *)malloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
+ if (NULL == (msg = (char *)malloc(strlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
TEST_ERROR;
if ((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
@@ -191,7 +191,7 @@ init_error(void)
if (cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
TEST_ERROR;
- if (HDstrcmp(ERR_CLS_NAME, cls_name) != 0)
+ if (strcmp(ERR_CLS_NAME, cls_name) != 0)
TEST_ERROR;
if ((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0)
@@ -216,7 +216,7 @@ init_error(void)
TEST_ERROR;
if (msg_type != H5E_MINOR)
TEST_ERROR;
- if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
+ if (strcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
TEST_ERROR;
/* Register another class for later testing. */
@@ -293,7 +293,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
{
char *real_desc = (char *)client_data;
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, real_desc) == 0)
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, real_desc) == 0)
return 0;
else
return -1;
@@ -345,10 +345,10 @@ test_long_desc(void)
long_desc) < 0)
TEST_ERROR;
- /* Create the string that should be in the description. Must use HDsnprintf here
+ /* Create the string that should be in the description. Must use snprintf here
* because snprintf is _snprintf on Windows
*/
- HDsnprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
+ snprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
/* Make certain that the description is correct */
if (H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, long_desc_cb, full_desc) < 0)
@@ -879,7 +879,7 @@ main(void)
* the test file was pre-generated.
*/
h5_fixname(DATAFILE, H5P_DEFAULT, filename, sizeof filename);
- if (!h5_using_default_driver(env_h5_drvr) && HDstrcmp(env_h5_drvr, "stdio")) {
+ if (!h5_using_default_driver(env_h5_drvr) && strcmp(env_h5_drvr, "stdio")) {
/* If not using the library's default VFD or the stdio VFD, force
* the library's default VFD here. The test file was pre-generated
* and can cause issues with many VFDs.