]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: parser: Set empty values to NULL
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Mar 2019 16:45:29 +0000 (16:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Mar 2019 16:45:29 +0000 (16:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/parser/grammar.y

index e034a1fb4debb7568bc76b5e7cba1af77a906b15..9699f1e5094d6c321fa15c5833dbbde012246749 100644 (file)
@@ -92,7 +92,10 @@ words                                                : WORD
                                                                $$ = $1;
                                                        }
                                                        | words WHITESPACE WORD
-                                                       | /* empty */;
+                                                       | /* empty */
+                                                       {
+                                                               $$ = NULL;
+                                                       };
 
 line                                           : whitespace words NEWLINE
                                                        {
@@ -101,7 +104,10 @@ line                                               : whitespace words NEWLINE
 
 text                                           : text line
                                                        | line
-                                                       | /* empty */;
+                                                       | /* empty */
+                                                       {
+                                                               $$ = NULL;
+                                                       };
 
 block_opening                          : variable NEWLINE
                                                        {