From 2277a8cf318359885be67aad566c70f497551cca Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 5 Mar 2019 13:13:52 +0100 Subject: segtree: remove dummy debug_octx Breaks custom-defined configuration in library mode, ie. user may want to store output in a file, instead of stderr. Fixes: 35f6cd327c2e ("src: Pass stateless, numeric, ip2name and handle variables as structure members.") Signed-off-by: Pablo Neira Ayuso --- src/segtree.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/segtree.c') diff --git a/src/segtree.c b/src/segtree.c index e3a2f48c..939c30d2 100644 --- a/src/segtree.c +++ b/src/segtree.c @@ -566,10 +566,9 @@ static void set_insert_interval(struct expr *set, struct seg_tree *tree, int set_to_intervals(struct list_head *errs, struct set *set, struct expr *init, bool add, unsigned int debug_mask, - bool merge) + bool merge, struct output_ctx *octx) { struct elementary_interval *ei, *next; - struct output_ctx debug_octx; struct seg_tree tree; LIST_HEAD(list); @@ -590,10 +589,7 @@ int set_to_intervals(struct list_head *errs, struct set *set, } if (segtree_debug(tree.debug_mask)) { - memset(&debug_octx, 0, sizeof(debug_octx)); - debug_octx.output_fp = stderr; - debug_octx.error_fp = stderr; - expr_print(init, &debug_octx); + expr_print(init, octx); pr_gmp_debug("\n"); } -- cgit v1.2.3