summaryrefslogtreecommitdiffstats
path: root/src/H5Pdapl.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2021-09-14 20:24:01 (GMT)
committerGitHub <noreply@github.com>2021-09-14 20:24:01 (GMT)
commitcd2ca91875be7d3ee98ab0131c32b9ee072509e5 (patch)
treebc73d8cd6acbe9f2f76dcbcc21374dc0b38e9908 /src/H5Pdapl.c
parent7c973deaf1e602cf165a39860e574a9b5468d164 (diff)
downloadhdf5-cd2ca91875be7d3ee98ab0131c32b9ee072509e5.zip
hdf5-cd2ca91875be7d3ee98ab0131c32b9ee072509e5.tar.gz
hdf5-cd2ca91875be7d3ee98ab0131c32b9ee072509e5.tar.bz2
Fix several warnings (#720)
Diffstat (limited to 'src/H5Pdapl.c')
-rw-r--r--src/H5Pdapl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 2ebdbe3..d374b25 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -1453,7 +1453,7 @@ H5Pget_efile_prefix(hid_t plist_id, char *prefix /*out*/, size_t size)
/* Copy to user's buffer, if given */
len = HDstrlen(my_prefix);
if (prefix) {
- HDstrncpy(prefix, my_prefix, MIN(len + 1, size));
+ HDstrncpy(prefix, my_prefix, size);
if (len >= size)
prefix[size - 1] = '\0';
} /* end if */
@@ -1543,7 +1543,7 @@ H5Pget_virtual_prefix(hid_t plist_id, char *prefix /*out*/, size_t size)
/* Copy to user's buffer, if given */
len = HDstrlen(my_prefix);
if (prefix) {
- HDstrncpy(prefix, my_prefix, MIN(len + 1, size));
+ HDstrncpy(prefix, my_prefix, size);
if (len >= size)
prefix[size - 1] = '\0';
} /* end if */