summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2019-12-11 16:44:56 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:20:25 (GMT)
commit95e509db46c7007561a38fcfe76c38d91ea79e49 (patch)
treee3c7e721d6f15b3ac28c4d8e0db27e4fb95c0c6c /tools/lib
parent9281d24a5bd5cb3ee3cde77a7d1e5e69ef05aa62 (diff)
downloadhdf5-95e509db46c7007561a38fcfe76c38d91ea79e49.zip
hdf5-95e509db46c7007561a38fcfe76c38d91ea79e49.tar.gz
hdf5-95e509db46c7007561a38fcfe76c38d91ea79e49.tar.bz2
fix and address comments
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5diff.c12
-rw-r--r--tools/lib/h5diff_attr.c12
2 files changed, 6 insertions, 18 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 4babc7d..92d2769 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -911,15 +911,9 @@ h5diff(const char *fname1,
parallel_print("file1 file2\n");
parallel_print("---------------------------------------\n");
for(u = 0; u < match_list->nobjs; u++) {
- char c1, c2;
- if (match_list->objs[u].flags[0])
- c1 = 'x';
- else
- c1 = ' ';
- if (match_list->objs[u].flags[1])
- c2 = 'x';
- else
- c2 = ' ';
+ int c1, c2;
+ c1 = (match_list->objs[u].flags[0]) ? 'x' : ' ';
+ c2 = (match_list->objs[u].flags[1]) ? 'x' : ' ';
parallel_print("%5c %6c %-15s\n", c1, c2, match_list->objs[u].name);
} /* end for */
parallel_print ("\n");
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 5bd27d4..5a85d79 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -278,15 +278,9 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
parallel_print(" obj1 obj2\n");
parallel_print(" --------------------------------------\n");
for(i = 0; i < (unsigned int) table_lp->nattrs; i++) {
- char c1, c2;
- if (table_lp->attrs[i].exist[0])
- c1 = 'x';
- else
- c1 = ' ';
- if (table_lp->attrs[i].exist[1])
- c2 = 'x';
- else
- c2 = ' ';
+ int c1, c2;
+ c1 = (table_lp->attrs[i].exist[0]) ? 'x' : ' ';
+ c2 = (table_lp->attrs[i].exist[1]) ? 'x' : ' ';
parallel_print("%5c %6c %-15s\n", c1, c2, table_lp->attrs[i].name);
} /* end for */
}