mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-27 16:32:05 +00:00
libsepol: remove some dead assignments
clang's static analyzer warns about dead assignments to local variables. In module_to_cil.c, there are some which are quite straightforward to review. Remove them. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
2dc6406a30
commit
1f8e748187
@ -1099,7 +1099,6 @@ static int roletype_role_in_ancestor_to_cil(struct policydb *pdb, struct stack *
|
||||
goto exit;
|
||||
}
|
||||
|
||||
curr = role_list->head;
|
||||
for (curr = role_list->head; curr != NULL; curr = curr->next) {
|
||||
role_node = curr->data;
|
||||
if (!is_id_in_ancestor_scope(pdb, decl_stack, role_node->role_name, SYM_ROLES)) {
|
||||
@ -1291,7 +1290,6 @@ static int cond_expr_to_cil(int indent, struct policydb *pdb, struct cond_expr *
|
||||
rc = -1;
|
||||
goto exit;
|
||||
}
|
||||
num_params = 0;
|
||||
} else {
|
||||
switch(curr->expr_type) {
|
||||
case COND_NOT: op = "not"; break;
|
||||
@ -1831,8 +1829,6 @@ static int constraint_expr_to_string(struct policydb *pdb, struct constraint_exp
|
||||
free(names);
|
||||
names = NULL;
|
||||
}
|
||||
|
||||
num_params = 0;
|
||||
} else {
|
||||
switch (expr->expr_type) {
|
||||
case CEXPR_NOT: op = "not"; break;
|
||||
|
Loading…
Reference in New Issue
Block a user