@@ -6387,10 +6387,10 @@ int __cil_build_ast_node_helper(struct cil_tree_node *parse_current, uint32_t *f
rc = cil_gen_macro(db, parse_current, ast_node);
} else if (parse_current->data == CIL_KEY_CALL) {
rc = cil_gen_call(db, parse_current, ast_node);
- *finished = 1;
+ *finished = CIL_TREE_SKIP_NEXT;
} else if (parse_current->data == CIL_KEY_POLICYCAP) {
rc = cil_gen_policycap(db, parse_current, ast_node);
- *finished = 1;
+ *finished = CIL_TREE_SKIP_NEXT;
} else if (parse_current->data == CIL_KEY_OPTIONAL) {
rc = cil_gen_optional(db, parse_current, ast_node);
} else if (parse_current->data == CIL_KEY_IPADDR) {
The function cil_tree_walk() has an argument that can be used by the process_node helper function to tell cil_tree_walk() to skip the node's sub-tree or the rest of the current branch. The constants CIL_TREE_SKIP_NOTHING, CIL_TREE_SKIP_NEXT and CIL_TREE_SKIP_HEAD are defined to be used by that argument. Fixed two instances in the function __cil_build_ast_node_helper() where the value 1 is used instead of the more informative CIL_TREE_SKIP_NEXT. Signed-off-by: James Carter <jwcart2@gmail.com> --- libsepol/cil/src/cil_build_ast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)