diff options
Diffstat (limited to 'ui/qt/models/proto_tree_model.cpp')
-rw-r--r-- | ui/qt/models/proto_tree_model.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/qt/models/proto_tree_model.cpp b/ui/qt/models/proto_tree_model.cpp index 3ededffd..fe6f7f95 100644 --- a/ui/qt/models/proto_tree_model.cpp +++ b/ui/qt/models/proto_tree_model.cpp @@ -188,7 +188,8 @@ struct find_hfid_ { ProtoNode *node; }; -bool ProtoTreeModel::foreachFindHfid(ProtoNode *node, gpointer find_hfid_ptr) +// NOLINTNEXTLINE(misc-no-recursion) +bool ProtoTreeModel::foreachFindHfid(ProtoNode *node, void *find_hfid_ptr) { struct find_hfid_ *find_hfid = (struct find_hfid_ *) find_hfid_ptr; if (PNODE_FINFO(node->protoNode()) && PNODE_FINFO(node->protoNode())->hfinfo->id == find_hfid->hfid) { @@ -196,6 +197,7 @@ bool ProtoTreeModel::foreachFindHfid(ProtoNode *node, gpointer find_hfid_ptr) return true; } for (int i = 0; i < node->childrenCount(); i++) { + // We recurse here, but we're limited by tree depth checks in epan if (foreachFindHfid(node->child(i), find_hfid)) { return true; } @@ -221,7 +223,8 @@ struct find_field_info_ { ProtoNode *node; }; -bool ProtoTreeModel::foreachFindField(ProtoNode *node, gpointer find_finfo_ptr) +// NOLINTNEXTLINE(misc-no-recursion) +bool ProtoTreeModel::foreachFindField(ProtoNode *node, void *find_finfo_ptr) { struct find_field_info_ *find_finfo = (struct find_field_info_ *) find_finfo_ptr; if (PNODE_FINFO(node->protoNode()) == find_finfo->fi) { @@ -229,6 +232,7 @@ bool ProtoTreeModel::foreachFindField(ProtoNode *node, gpointer find_finfo_ptr) return true; } for (int i = 0; i < node->childrenCount(); i++) { + // We recurse here, but we're limited by tree depth checks in epan if (foreachFindField(node->child(i), find_finfo)) { return true; } |