From 35f6cd327c2ec46296adf464f981cd6cddfec27b Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Fri, 16 Jun 2017 14:54:06 +0530 Subject: src: Pass stateless, numeric, ip2name and handle variables as structure members. libnftables library will be created soon. So declare numeric_output, stateless_output, ip2name_output and handle_output as members of structure output_ctx, instead of global variables. Rename these variables as following, numeric_output -> numeric stateless_output -> stateless ip2name_output -> ip2name handle_output -> handle Also add struct output_ctx *octx as member of struct netlink_ctx. Signed-off-by: Varsha Rao Signed-off-by: Pablo Neira Ayuso --- src/segtree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/segtree.c') diff --git a/src/segtree.c b/src/segtree.c index 15e8849c..a2316a7b 100644 --- a/src/segtree.c +++ b/src/segtree.c @@ -64,6 +64,8 @@ struct elementary_interval { struct expr *expr; }; +static struct output_ctx debug_octx = {}; + static void seg_tree_init(struct seg_tree *tree, const struct set *set, struct expr *init) { @@ -564,7 +566,7 @@ int set_to_intervals(struct list_head *errs, struct set *set, } if (segtree_debug()) { - expr_print(init); + expr_print(init, &debug_octx); pr_gmp_debug("\n"); } -- cgit v1.2.3