summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5util.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 /java/src/jni/h5util.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 'java/src/jni/h5util.c')
-rw-r--r--java/src/jni/h5util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 9f0117a..76c726a 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -945,7 +945,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i
}
else {
if (typeSize > 0) {
- if (NULL == (this_str = HDstrdup(tmp_str)))
+ if (NULL == (this_str = strdup(tmp_str)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_sprintf: failed to allocate string buffer");
}
}
@@ -3881,7 +3881,7 @@ obj_info_all(hid_t loc_id, const char *name, const H5L_info2_t *info, void *op_d
datainfo->ltype[datainfo->count] = -1;
datainfo->obj_token[datainfo->count] = H5O_TOKEN_UNDEF;
- if (NULL == (datainfo->objname[datainfo->count] = HDstrdup(name)))
+ if (NULL == (datainfo->objname[datainfo->count] = strdup(name)))
goto done;
if ((object_exists = H5Oexists_by_name(loc_id, name, H5P_DEFAULT)) < 0)
@@ -3916,7 +3916,7 @@ obj_info_max(hid_t loc_id, const char *name, const H5L_info2_t *info, void *op_d
datainfo->obj_token[datainfo->count] = H5O_TOKEN_UNDEF;
/* This will be freed by h5str_array_free(oName, n) */
- if (NULL == (datainfo->objname[datainfo->count] = HDstrdup(name)))
+ if (NULL == (datainfo->objname[datainfo->count] = strdup(name)))
goto done;
if (H5Oget_info3(loc_id, &object_info, H5O_INFO_ALL) < 0)