From 209c4d901e90e46faa14d1f38cb000f79514b3b2 Mon Sep 17 00:00:00 2001 From: Laurent Fasnacht Date: Mon, 10 Feb 2020 10:17:21 +0000 Subject: scanner: move the file descriptor to be in the input_descriptor structure This prevents a static allocation of file descriptors array, thus allows more flexibility. Signed-off-by: Laurent Fasnacht Signed-off-by: Pablo Neira Ayuso --- include/nftables.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/nftables.h') diff --git a/include/nftables.h b/include/nftables.h index 90d33196..07726e4d 100644 --- a/include/nftables.h +++ b/include/nftables.h @@ -122,7 +122,6 @@ struct nft_ctx { void *scanner; struct scope *top_scope; void *json_root; - FILE *f[MAX_INCLUDE_DEPTH]; }; enum nftables_exit_codes { @@ -176,6 +175,7 @@ enum input_descriptor_types { * struct input_descriptor * * @location: location, used for include statements + * @f: file descriptor * @type: input descriptor type * @name: name describing the input * @union: buffer or file descriptor, depending on type @@ -186,6 +186,7 @@ enum input_descriptor_types { */ struct input_descriptor { struct list_head list; + FILE *f; struct location location; enum input_descriptor_types type; const char *name; -- cgit v1.2.3