libsepol/cil: cil_tree_walk() helpers should use CIL_TREE_SKIP_*
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>
This commit is contained in:
parent
fe985a8c84
commit
ebba2b00f0
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue