diff options
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r-- | src/H5Rint.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c index c09b261..6a84f1c 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -102,14 +102,13 @@ H5R__print_token(const H5O_token_t token) static char string[64]; /* Print the raw token. */ - HDsnprintf(string, 64, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", - (unsigned char)token.__data[15], (unsigned char)token.__data[14], - (unsigned char)token.__data[13], (unsigned char)token.__data[12], - (unsigned char)token.__data[11], (unsigned char)token.__data[10], - (unsigned char)token.__data[9], (unsigned char)token.__data[8], (unsigned char)token.__data[7], - (unsigned char)token.__data[6], (unsigned char)token.__data[5], (unsigned char)token.__data[4], - (unsigned char)token.__data[3], (unsigned char)token.__data[2], (unsigned char)token.__data[1], - (unsigned char)token.__data[0]); + snprintf(string, 64, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", + (unsigned char)token.__data[15], (unsigned char)token.__data[14], + (unsigned char)token.__data[13], (unsigned char)token.__data[12], + (unsigned char)token.__data[11], (unsigned char)token.__data[10], (unsigned char)token.__data[9], + (unsigned char)token.__data[8], (unsigned char)token.__data[7], (unsigned char)token.__data[6], + (unsigned char)token.__data[5], (unsigned char)token.__data[4], (unsigned char)token.__data[3], + (unsigned char)token.__data[2], (unsigned char)token.__data[1], (unsigned char)token.__data[0]); return string; } @@ -279,13 +278,13 @@ H5R__create_attr(const H5O_token_t *obj_token, size_t token_size, const char *at assert(ref); /* Make sure that attribute name is not longer than supported encode size */ - if (HDstrlen(attr_name) > H5R_MAX_STRING_LEN) + if (strlen(attr_name) > H5R_MAX_STRING_LEN) HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, FAIL, "attribute name too long (%d > %d)", - (int)HDstrlen(attr_name), H5R_MAX_STRING_LEN); + (int)strlen(attr_name), H5R_MAX_STRING_LEN); /* Create new reference */ ref->info.obj.filename = NULL; - if (NULL == (ref->info.attr.name = HDstrdup(attr_name))) + if (NULL == (ref->info.attr.name = strdup(attr_name))) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy attribute name"); ref->loc_id = H5I_INVALID_HID; @@ -583,7 +582,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2) ((NULL == ref1->info.obj.filename) && ref2->info.obj.filename)) HGOTO_DONE(false); if (ref1->info.obj.filename && ref1->info.obj.filename && - (0 != HDstrcmp(ref1->info.obj.filename, ref2->info.obj.filename))) + (0 != strcmp(ref1->info.obj.filename, ref2->info.obj.filename))) HGOTO_DONE(false); switch (ref1->type) { @@ -595,7 +594,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2) break; case H5R_ATTR: assert(ref1->info.attr.name && ref2->info.attr.name); - if (0 != HDstrcmp(ref1->info.attr.name, ref2->info.attr.name)) + if (0 != strcmp(ref1->info.attr.name, ref2->info.attr.name)) HGOTO_DONE(false); break; case H5R_OBJECT1: @@ -644,7 +643,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace"); break; case H5R_ATTR: - if (NULL == (dst_ref->info.attr.name = HDstrdup(src_ref->info.attr.name))) + if (NULL == (dst_ref->info.attr.name = strdup(src_ref->info.attr.name))) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy attribute name"); break; case H5R_OBJECT1: @@ -662,7 +661,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref) if (src_ref->loc_id == H5I_INVALID_HID) { assert(src_ref->info.obj.filename); - if (NULL == (dst_ref->info.obj.filename = HDstrdup(src_ref->info.obj.filename))) + if (NULL == (dst_ref->info.obj.filename = strdup(src_ref->info.obj.filename))) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy filename"); dst_ref->loc_id = H5I_INVALID_HID; } @@ -795,7 +794,7 @@ H5R__get_file_name(const H5R_ref_priv_t *ref, char *buf, size_t size) HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, (-1), "no filename available for that reference"); /* Get the file name length */ - copy_len = HDstrlen(ref->info.obj.filename); + copy_len = strlen(ref->info.obj.filename); assert(copy_len <= H5R_MAX_STRING_LEN); /* Copy the file name */ @@ -832,7 +831,7 @@ H5R__get_attr_name(const H5R_ref_priv_t *ref, char *buf, size_t size) assert(ref->type == H5R_ATTR); /* Get the attribute name length */ - attr_name_len = HDstrlen(ref->info.attr.name); + attr_name_len = strlen(ref->info.attr.name); assert(attr_name_len <= H5R_MAX_STRING_LEN); /* Get the attribute name */ @@ -1245,7 +1244,7 @@ H5R__encode_string(const char *string, unsigned char *buf, size_t *nalloc) assert(nalloc); /* Get the amount of space required to serialize the string */ - string_len = HDstrlen(string); + string_len = strlen(string); if (string_len > H5R_MAX_STRING_LEN) HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, FAIL, "string too long"); |