Skip to content

Commit

Permalink
checkpolicy: drop never read member
Browse files Browse the repository at this point in the history
The struct scope_stack member child is never read, drop it.

Signed-off-by: Christian Göttsche <[email protected]>
Acked-by: James Carter <[email protected]>
  • Loading branch information
cgzones authored and jwcart2 committed Apr 4, 2024
1 parent 8c64e5b commit 08e55df
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions checkpolicy/module_compiler.c
Expand Up @@ -34,7 +34,7 @@ typedef struct scope_stack {
avrule_t *last_avrule;
int in_else; /* if in an avrule block, within ELSE branch */
int require_given; /* 1 if this block had at least one require */
struct scope_stack *parent, *child;
struct scope_stack *parent;
} scope_stack_t;

extern policydb_t *policydbp;
Expand Down Expand Up @@ -1478,7 +1478,6 @@ static int push_stack(int stack_type, ...)
}
va_end(ap);
s->parent = stack_top;
s->child = NULL;
stack_top = s;
return 0;
}
Expand All @@ -1490,9 +1489,6 @@ static void pop_stack(void)
scope_stack_t *parent;
assert(stack_top != NULL);
parent = stack_top->parent;
if (parent != NULL) {
parent->child = NULL;
}
free(stack_top);
stack_top = parent;
}
Expand Down

0 comments on commit 08e55df

Please sign in to comment.