Skip to content

Commit

Permalink
Replace empty rules with the %empty directive.
Browse files Browse the repository at this point in the history
This avoids a warning from bison.
  • Loading branch information
jaqx0r committed Apr 5, 2024
1 parent 7449ad7 commit 8673ff5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions input/iptables-save/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ ast: table_list
ast->list = $1;
}

table_list: /* empty */
table_list: %empty
{
$$ = NULL;
}
Expand All @@ -215,7 +215,7 @@ table: TOK_IPTS_TABLE TOK_IDENTIFIER rule_list TOK_COMMIT
$$->rule_list = $3;
}

rule_list: /* empty */
rule_list: %empty
{
$$ = NULL;
}
Expand Down Expand Up @@ -250,7 +250,7 @@ rule_specification: option_list
$$ = $1;
}

option_list: /* empty */
option_list: %empty
{
$$ = NULL;
}
Expand Down Expand Up @@ -588,7 +588,7 @@ identifier: TOK_IDENTIFIER
$$->string = $2;
}

opt_pkt_count: /* empty */
opt_pkt_count: %empty
{
$$ = NULL;
}
Expand Down

0 comments on commit 8673ff5

Please sign in to comment.