libsepol/cil: Get rid of unnecessary check in cil_gen_node()

Since cil_gen_node() is only called from declarations, the check to
determine if the node is a declaration is not needed, so remove it.

Signed-off-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
James Carter 2020-11-16 17:06:58 -05:00 committed by Nicolas Iooss
parent ebba2b00f0
commit e257d4c748
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0

View File

@ -154,7 +154,7 @@ int cil_gen_node(struct cil_db *db, struct cil_tree_node *ast_node, struct cil_s
}
}
if (ast_node->flavor >= CIL_MIN_DECLARATIVE && ast_node->parent->flavor == CIL_MACRO) {
if (ast_node->parent->flavor == CIL_MACRO) {
struct cil_list_item *item;
struct cil_list *param_list = ((struct cil_macro*)ast_node->parent->data)->params;
if (param_list != NULL) {