diff mbox

[nft,2/4] scanner: Fix for wrong parameter type of scanner_destroy()

Message ID 20170824171413.31737-3-phil@nwl.cc
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Phil Sutter Aug. 24, 2017, 5:14 p.m. UTC
The function takes the scanner as argument, not the state. This wasn't a
real issue since scanner is a void pointer, which means it's only casted
around without need. So this fix is a rather cosmetic one.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 include/parser.h | 2 +-
 src/scanner.l    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/include/parser.h b/include/parser.h
index 0e266d60b8a31..431edfb3d4e34 100644
--- a/include/parser.h
+++ b/include/parser.h
@@ -37,7 +37,7 @@  extern void parser_init(struct mnl_socket *nf_sock, struct nft_cache *cache,
 extern int nft_parse(struct nft_ctx *ctx, void *, struct parser_state *state);
 
 extern void *scanner_init(struct parser_state *state);
-extern void scanner_destroy(struct parser_state *state);
+extern void scanner_destroy(void *scanner);
 
 extern int scanner_read_file(void *scanner, const char *filename,
 			     const struct location *loc);
diff --git a/src/scanner.l b/src/scanner.l
index 25e4eb1c70ec1..7d57cc1465d3a 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -856,7 +856,7 @@  void *scanner_init(struct parser_state *state)
 	return scanner;
 }
 
-void scanner_destroy(struct parser_state *scanner)
+void scanner_destroy(void *scanner)
 {
 	struct parser_state *state = yyget_extra(scanner);