summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2011-03-22 15:47:07 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2011-03-22 15:47:07 (GMT)
commit4147de8d02fdfb651e860df999f87263d72be573 (patch)
tree0c12e5c4d19e03085adffaf51ac0fd7f1d67154e /tools/lib/h5tools_utils.c
parentf92d2371ffce9ec664833187cadb0223fa1dc1c2 (diff)
downloadhdf5-4147de8d02fdfb651e860df999f87263d72be573.zip
hdf5-4147de8d02fdfb651e860df999f87263d72be573.tar.gz
hdf5-4147de8d02fdfb651e860df999f87263d72be573.tar.bz2
[svn-r20294] Purpose:
Fixed CHICAGO: Bug 2121 - h5diff - incorrect and lack of output for the different set of attributes (different number and names) Description: Previously h5diff compared attributes correctly only when two objects have the same number of attributes and attribute names are identical. This fix covers all other cases. Also didn't display useful information about attribute difference. This fixes both issues. Tested: jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE)
Diffstat (limited to 'tools/lib/h5tools_utils.c')
-rw-r--r--tools/lib/h5tools_utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 7586fd0..5048b87 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -231,8 +231,11 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (l_opts[i].has_arg != no_arg) {
if (arg[len] == '=') {
opt_arg = &arg[len + 1];
- } else if (opt_ind < (argc - 1) && argv[opt_ind + 1][0] != '-') {
- opt_arg = argv[++opt_ind];
+ }
+ else if (l_opts[i].has_arg != optional_arg) {
+ if (opt_ind < (argc - 1))
+ if (argv[opt_ind + 1][0] != '-')
+ opt_arg = argv[++opt_ind];
} else if (l_opts[i].has_arg == require_arg) {
if (opt_err)
HDfprintf(stderr,