summaryrefslogtreecommitdiffstats
path: root/src/H5Gloc.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 /src/H5Gloc.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 'src/H5Gloc.c')
-rw-r--r--src/H5Gloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 477c31f..1ba45de 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -871,7 +871,7 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Add the new message */
if (udata->comment && *udata->comment) {
- if (NULL == (comment.s = HDstrdup(udata->comment)))
+ if (NULL == (comment.s = strdup(udata->comment)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy group comment");
if (H5O_msg_create(obj_loc->oloc, H5O_NAME_ID, 0, H5O_UPDATE_TIME, &comment) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message");
@@ -953,8 +953,8 @@ H5G__loc_get_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
}
else {
if (udata->comment && udata->bufsize)
- HDstrncpy(udata->comment, comment.s, udata->bufsize);
- udata->comment_size = HDstrlen(comment.s);
+ strncpy(udata->comment, comment.s, udata->bufsize);
+ udata->comment_size = strlen(comment.s);
H5O_msg_reset(H5O_NAME_ID, &comment);
}