summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_attr.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2013-02-21 19:23:53 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2013-02-21 19:23:53 (GMT)
commit6bf2f2482e0c2462d27870697f3484bda040246d (patch)
treea384edf78298cc73285d34116343d119f14669d6 /tools/lib/h5diff_attr.c
parent53bec20a49b942d75d0cc3739c078d5d81cc1d95 (diff)
downloadhdf5-6bf2f2482e0c2462d27870697f3484bda040246d.zip
hdf5-6bf2f2482e0c2462d27870697f3484bda040246d.tar.gz
hdf5-6bf2f2482e0c2462d27870697f3484bda040246d.tar.bz2
[svn-r23309] Purpose:
HDFFV-7643 - h5diff - incorrect exit-code returns for extra attribute exist Description: h5diff: Fixed to return correct exit code 1 when detect unique attribute. Prior to this fix, h5diff returned exit code 0 indicating two files are identical. Merged from HDF5 trunk r23304. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), fred (mac64-LE), emu (solaris-BE), Windows (32-LE cmake), cmake (jam)
Diffstat (limited to 'tools/lib/h5diff_attr.c')
-rw-r--r--tools/lib/h5diff_attr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 130a0d8..4899200 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -350,6 +350,13 @@ hsize_t diff_attr(hid_t loc1_id,
if( build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0)
goto error;
+ /* if detect any unique extra attr */
+ if(match_list_attrs->nattrs_only1 || match_list_attrs->nattrs_only2)
+ {
+ /* exit will be 1 */
+ options->contents = 0;
+ }
+
for(u = 0; u < (unsigned)match_list_attrs->nattrs; u++)
{
if( (match_list_attrs->attrs[u].exist[0]) && (match_list_attrs->attrs[u].exist[1]) )