From 6d4c194c04f46e8016f583717e0883170b18a6c6 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 21 Jul 2015 12:54:57 +0200 Subject: [PATCH] Fix logic of determining if changes happened in abidiff 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 --- tools/abidiff.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/abidiff.cc b/tools/abidiff.cc index 0ea41726..d4953450 100644 --- a/tools/abidiff.cc +++ b/tools/abidiff.cc @@ -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 -- 2.43.5