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/H5Lint.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/H5Lint.c')
-rw-r--r-- | src/H5Lint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Lint.c b/src/H5Lint.c index e0040e4..e33ad93 100644 --- a/src/H5Lint.c +++ b/src/H5Lint.c @@ -925,8 +925,8 @@ H5L__get_val_real(const H5O_link_t *lnk, void *buf, size_t size) if (H5L_TYPE_SOFT == lnk->type) { /* Copy to output buffer */ if (size > 0 && buf) { - HDstrncpy((char *)buf, lnk->u.soft.name, size); - if (HDstrlen(lnk->u.soft.name) >= size) + strncpy((char *)buf, lnk->u.soft.name, size); + if (strlen(lnk->u.soft.name) >= size) ((char *)buf)[size - 1] = '\0'; } /* end if */ } /* end if */ @@ -1627,7 +1627,7 @@ H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT /* Look for another separator */ next = udata->sep; - if (NULL == (udata->sep = HDstrchr(udata->sep, '/'))) + if (NULL == (udata->sep = strchr(udata->sep, '/'))) cb_func = H5L__exists_final_cb; else { /* Chew through adjacent separators, if present */ @@ -1693,7 +1693,7 @@ H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, bool *exists) else { /* Set up user data & correct callback */ udata.exists = exists; - if (NULL == (udata.sep = HDstrchr(name_trav, '/'))) + if (NULL == (udata.sep = strchr(name_trav, '/'))) cb_func = H5L__exists_final_cb; else { /* Chew through adjacent separators, if present */ @@ -1742,7 +1742,7 @@ H5L__exists(const H5G_loc_t *loc, const char *name, bool *exists) assert(exists); /* A path of "/" will always exist in a file */ - if (0 == HDstrcmp(name, "/")) + if (0 == strcmp(name, "/")) *exists = true; else { /* Traverse the group hierarchy to locate the object to get info about */ |