Now that we have a proper stack implementation, we don't need an
additional counter for the number of buffer state pushed.
Signed-off-by: Laurent Fasnacht <fasnacht@protonmail.ch>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
struct parser_state {
struct input_descriptor *indesc;
- unsigned int indesc_idx;
struct list_head indesc_list;
struct list_head *msgs;
list_add(&indesc->list, &state->indesc->list);
state->indesc = indesc;
- state->indesc_idx++;
}
static void scanner_pop_indesc(struct parser_state *state)
{
- state->indesc_idx--;
if (!list_empty(&state->indesc_list)) {
state->indesc = list_entry(state->indesc->list.prev,
struct input_descriptor, list);
{
struct parser_state *state = yyget_extra(nft->scanner);
- do {
- yypop_buffer_state(nft->scanner);
- } while (state->indesc_idx--);
-
input_descriptor_list_destroy(state);
yylex_destroy(nft->scanner);
}