aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuliano Procida <gprocida@google.com>2023-05-02 13:45:51 +0100
committerGiuliano Procida <gprocida@google.com>2023-05-02 13:49:46 +0100
commit523589819d85e45573323d93708cb677185f2480 (patch)
tree2c9c65e6300ffbeabfdf6b9533845d32a5e112b3
parent9f2d66a4e204b7ba5452d030ade601f238f62f0e (diff)
downloadlibabigail-523589819d85e45573323d93708cb677185f2480.tar.gz
abitidy: fix data member deduplication element filter
The code now restricts its attention to `class-decl` and `union-decl` elements, as originally intended, instead of checking every element. Bug: 266148118 Change-Id: Ib8b9d0bc83996eadf38b2aacf734238913d04590 Signed-off-by: Giuliano Procida <gprocida@google.com>
-rw-r--r--tools/abitidy.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/abitidy.cc b/tools/abitidy.cc
index e23795f8..3bdfffd0 100644
--- a/tools/abitidy.cc
+++ b/tools/abitidy.cc
@@ -1302,7 +1302,8 @@ size_t handle_excess_members(bool eliminate, xmlNodePtr root)
// preorder in case we delete a nested type
for (auto child : get_children(node))
dfs(child);
- if (strcmp(node_name, "class-decl") || strcmp(node_name, "union-decl"))
+ if (strcmp(node_name, "class-decl") == 0
+ || strcmp(node_name, "union-decl") == 0)
types.push_back(node);
};
dfs(root);