From: Michael Tremer Date: Sat, 1 Jun 2019 02:46:27 +0000 (+0100) Subject: libpakfire: parser: NULL can be passed all the way to the top X-Git-Tag: 0.9.28~1285^2~1007 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2171119d7b9f1e361691dbaa809e6aeed1890ce7;p=pakfire.git libpakfire: parser: NULL can be passed all the way to the top This avoids merging empty parsers Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/parser/grammar.y b/src/libpakfire/parser/grammar.y index 8245b900c..25f1d1cdc 100644 --- a/src/libpakfire/parser/grammar.y +++ b/src/libpakfire/parser/grammar.y @@ -204,12 +204,7 @@ block_assignments : block_assignments block_assignment { $$ = merge_parsers($1, $2); } - | block_assignment { - if ($1) - $$ = $1; - else - $$ = new_parser(parser, NULL); - }; + | block_assignment; block_assignment : assignment | block