]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
scanner: Make use of yylex_init_extra()
authorPhil Sutter <phil@nwl.cc>
Thu, 24 Aug 2017 17:14:12 +0000 (19:14 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 24 Aug 2017 17:20:29 +0000 (19:20 +0200)
This combines the calls to yylex_init() and yyset_extra().

Signed-off-by: Phil Sutter <phil@nwl.cc>
src/scanner.l

index 7d57cc1465d3a7713f3fb4caaea3af6731723f9a..f0021c5c0fbae510eb0f7a2ea7ed40b8ddabc52e 100644 (file)
@@ -849,8 +849,7 @@ void *scanner_init(struct parser_state *state)
 
        state->indesc = state->indescs;
 
-       yylex_init(&scanner);
-       yyset_extra(state, scanner),
+       yylex_init_extra(state, &scanner);
        yyset_out(NULL, scanner);
 
        return scanner;