checkpolicy: drop union stack_item_u
The union stack_item_u is only used as a member in struct scope_stack, but actually never used. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
08e55dfffe
commit
04303b5bb4
|
@ -21,14 +21,8 @@
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "module_compiler.h"
|
#include "module_compiler.h"
|
||||||
|
|
||||||
union stack_item_u {
|
|
||||||
avrule_block_t *avrule;
|
|
||||||
cond_list_t *cond_list;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct scope_stack {
|
typedef struct scope_stack {
|
||||||
union stack_item_u u;
|
int type; /* 1 = avrule block, 2 = conditional */
|
||||||
int type; /* for above union: 1 = avrule block, 2 = conditional */
|
|
||||||
avrule_decl_t *decl; /* if in an avrule block, which
|
avrule_decl_t *decl; /* if in an avrule block, which
|
||||||
* declaration is current */
|
* declaration is current */
|
||||||
avrule_t *last_avrule;
|
avrule_t *last_avrule;
|
||||||
|
@ -1464,12 +1458,12 @@ static int push_stack(int stack_type, ...)
|
||||||
va_start(ap, stack_type);
|
va_start(ap, stack_type);
|
||||||
switch (s->type = stack_type) {
|
switch (s->type = stack_type) {
|
||||||
case 1:{
|
case 1:{
|
||||||
s->u.avrule = va_arg(ap, avrule_block_t *);
|
va_arg(ap, avrule_block_t *);
|
||||||
s->decl = va_arg(ap, avrule_decl_t *);
|
s->decl = va_arg(ap, avrule_decl_t *);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:{
|
case 2:{
|
||||||
s->u.cond_list = va_arg(ap, cond_list_t *);
|
va_arg(ap, cond_list_t *);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue