]> sourceware.org Git - libabigail.git/commitdiff
Fix logic of determining if changes happened in abidiff
authorDodji Seketeli <dodji@redhat.com>
Tue, 21 Jul 2015 10:54:57 +0000 (12:54 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 21 Jul 2015 10:54:57 +0000 (12:54 +0200)
Now that we can easily check if the diff between two corpora carries
net changes (i.e, changes after applying suppression specifications)
we can simplify the logic of determining if the corpora have
"worthwhile" changes, in abidiff.

* tools/abidiff.cc (main): Simplify the logic when determining if
the comparison between two corpora yields worthwhile changes.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
tools/abidiff.cc

index 0ea41726a2c1d1641c7faeb418ba1584283f06a0..d4953450962950eeeacd10fe4558b125ac94ab43 100644 (file)
@@ -666,13 +666,13 @@ main(int argc, char* argv[])
          set_diff_context_from_opts(ctxt, opts);
          corpus_diff_sptr diff = compute_diff(c1, c2, ctxt);
 
-         if (diff->has_incompatible_changes())
-           status = (abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE
-                     | abigail::tools_utils::ABIDIFF_ABI_CHANGE);
-         else if (diff->has_net_subtype_changes())
+         if (diff->has_net_changes())
            status = abigail::tools_utils::ABIDIFF_ABI_CHANGE;
 
-         if (diff->has_changes() > 0)
+         if (diff->has_incompatible_changes())
+           status |= abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE;
+
+         if (diff->has_changes())
            diff->report(cout);
        }
       else
This page took 0.036225 seconds and 5 git commands to generate.