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 /src/H5Pint.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 'src/H5Pint.c')
-rw-r--r-- | src/H5Pint.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Pint.c b/src/H5Pint.c index ccdf3a5..da7f887 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -1677,7 +1677,7 @@ H5P__open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key) /* Check if the class object has the same parent as the new class */ if (obj->parent == key->parent) { /* Check if they have the same name */ - if (HDstrcmp(obj->name, key->name) == 0) { + if (strcmp(obj->name, key->name) == 0) { key->new_class = obj; ret_value = 1; /* Indicate a match */ } /* end if */ @@ -3603,7 +3603,7 @@ H5P__cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2) assert(prop2); /* Check the name */ - if ((cmp_value = HDstrcmp(prop1->name, prop2->name)) != 0) + if ((cmp_value = strcmp(prop1->name, prop2->name)) != 0) HGOTO_DONE(cmp_value); /* Check the size of properties */ @@ -3738,7 +3738,7 @@ H5P__cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2) HGOTO_DONE(0); /* Check the name */ - if ((cmp_value = HDstrcmp(pclass1->name, pclass2->name)) != 0) + if ((cmp_value = strcmp(pclass1->name, pclass2->name)) != 0) HGOTO_DONE(cmp_value); /* Check the number of properties */ @@ -5350,13 +5350,13 @@ H5P__get_class_path(H5P_genclass_t *pclass) /* Allocate enough space for the parent class's path, plus the '/' * separator, this class's name and the string terminator */ - ret_str_len = HDstrlen(par_path) + HDstrlen(pclass->name) + 1 + + ret_str_len = strlen(par_path) + strlen(pclass->name) + 1 + 3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */ if (NULL == (ret_value = (char *)H5MM_malloc(ret_str_len))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for class name"); /* Build the full path for this class */ - HDsnprintf(ret_value, ret_str_len, "%s/%s", par_path, pclass->name); + snprintf(ret_value, ret_str_len, "%s/%s", par_path, pclass->name); /* Free the parent class's path */ H5MM_xfree(par_path); @@ -5411,7 +5411,7 @@ H5P__open_class_path(const char *path) /* Find the generic property class with this full path */ curr_name = tmp_path; curr_class = NULL; - while (NULL != (delimit = HDstrchr(curr_name, '/'))) { + while (NULL != (delimit = strchr(curr_name, '/'))) { /* Change the delimiter to terminate the string */ *delimit = '\0'; |