summaryrefslogtreecommitdiffstats
path: root/tools/src/h5dump/h5dump_ddl.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5dump/h5dump_ddl.c')
-rw-r--r--tools/src/h5dump/h5dump_ddl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index 638a738..b0bce0c 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -829,7 +829,7 @@ dump_group(hid_t gid, const char *name)
if (!HDstrcmp(name, "/") && unamedtype) {
unsigned u; /* Local index variable */
- /* dump unamed type in root group */
+ /* dump unnamed type in root group */
for (u = 0; u < type_table->nobjs; u++)
if (!type_table->objs[u].recorded) {
char *obj_tok_str = NULL;
@@ -838,7 +838,7 @@ dump_group(hid_t gid, const char *name)
type = H5Dget_type(dset);
H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str);
- HDsprintf(type_name, "#%s", obj_tok_str);
+ HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
H5free_memory(obj_tok_str);
dump_function_table->dump_named_datatype_function(type, type_name);
@@ -1283,7 +1283,7 @@ dump_fcontents(hid_t fid)
{
PRINTSTREAM(rawoutstream, "%s %s\n", FILE_CONTENTS, BEGIN);
- /* special case of unamed types in root group */
+ /* special case of unnamed types in root group */
if (unamedtype) {
unsigned u;
@@ -1318,7 +1318,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
j = (int)HDstrlen(op_name) - 1;
/* find the last / */
while (j >= 0) {
- if (op_name[j] == '/' && (j == 0 || (j > 0 && op_name[j - 1] != '\\')))
+ if (op_name[j] == '/' && (j == 0 || (op_name[j - 1] != '\\')))
break;
j--;
}
@@ -1541,7 +1541,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
/* find the last / */
while (j >= 0) {
- if (attr[j] == '/' && (j == 0 || (j > 0 && attr[j - 1] != '\\')))
+ if (attr[j] == '/' && (j == 0 || (attr[j - 1] != '\\')))
break;
j--;
}
@@ -1959,7 +1959,7 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED *data, int pe,
const char *real_name = display_name ? display_name : type;
if ((type_id = H5Topen2(fid, type, H5P_DEFAULT)) < 0) {
- /* check if type is unamed datatype */
+ /* check if type is unnamed datatype */
unsigned idx = 0;
while (idx < type_table->nobjs) {
@@ -1968,9 +1968,9 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED *data, int pe,
if (!type_table->objs[idx].recorded) {
char *obj_tok_str = NULL;
- /* unamed datatype */
+ /* unnamed datatype */
H5Otoken_to_str(fid, &type_table->objs[idx].obj_token, &obj_tok_str);
- HDsprintf(name, "/#%s", obj_tok_str);
+ HDsnprintf(name, sizeof(name), "/#%s", obj_tok_str);
H5free_memory(obj_tok_str);
if (!HDstrcmp(name, real_name))