summaryrefslogtreecommitdiffstats
path: root/src/H5Opline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Opline.c')
-rw-r--r--src/H5Opline.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 1f6db59..897fa34 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -192,7 +192,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
size_t max = (size_t)(p_end - p + 1); /* Max possible name length */
/* Determine actual name length (without padding, but with null terminator) */
- actual_name_length = HDstrnlen((const char *)p, max);
+ actual_name_length = strnlen((const char *)p, max);
if (actual_name_length == max)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "filter name not null terminated");
actual_name_length += 1; /* include \0 byte */
@@ -206,7 +206,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
else
filter->name = filter->_name;
- HDstrncpy(filter->name, (const char *)p, actual_name_length);
+ strncpy(filter->name, (const char *)p, actual_name_length);
if (H5_IS_BUFFER_OVERFLOW(p, name_length, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
@@ -311,7 +311,7 @@ H5O__pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p /*out*/, const void *mesg)
*/
if (NULL == (name = filter->name) && (cls = H5Z_find(filter->id)))
name = cls->name;
- name_length = name ? HDstrlen(name) + 1 : 0;
+ name_length = name ? strlen(name) + 1 : 0;
/* Filter name length */
UINT16ENCODE(p, pline->version == H5O_PLINE_VERSION_1 ? H5O_ALIGN_OLD(name_length) : name_length);
@@ -394,7 +394,7 @@ H5O__pline_copy(const void *_src, void *_dst /*out*/)
if (src->filter[i].name) {
size_t namelen; /* Length of source filter name, including null terminator */
- namelen = HDstrlen(src->filter[i].name) + 1;
+ namelen = strlen(src->filter[i].name) + 1;
/* Allocate space for the filter name, or use the internal buffer */
if (namelen > H5Z_COMMON_NAME_LEN) {
@@ -478,7 +478,7 @@ H5O__pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
/* Get the name of the filter, same as done with H5O__pline_encode() */
if (NULL == (name = pline->filter[i].name) && (cls = H5Z_find(pline->filter[i].id)))
name = cls->name;
- name_len = name ? HDstrlen(name) + 1 : 0;
+ name_len = name ? strlen(name) + 1 : 0;
} /* end else */
ret_value +=
@@ -529,7 +529,7 @@ H5O__pline_reset(void *mesg)
/* Free information for each filter */
for (i = 0; i < pline->nused; i++) {
if (pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name)
- assert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
+ assert((strlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
if (pline->filter[i].name != pline->filter[i]._name)
pline->filter[i].name = (char *)H5MM_xfree(pline->filter[i].name);
if (pline->filter[i].cd_values && pline->filter[i].cd_values != pline->filter[i]._cd_values)
@@ -652,7 +652,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
char name[64];
memset(name, 0, 64);
- HDsnprintf(name, sizeof(name), "Filter at position %zu", i);
+ snprintf(name, sizeof(name), "Filter at position %zu", i);
fprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
fprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
@@ -671,7 +671,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
for (size_t j = 0; j < pline->filter[i].cd_nelmts; j++) {
char field_name[32];
- HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
+ snprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
fprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name,
pline->filter[i].cd_values[j]);
}