diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/segtree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/segtree.c b/src/segtree.c index e5dfd413..e3a2f48c 100644 --- a/src/segtree.c +++ b/src/segtree.c @@ -9,6 +9,7 @@ */ #include <stdlib.h> +#include <string.h> #include <inttypes.h> #include <arpa/inet.h> @@ -67,8 +68,6 @@ 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, unsigned int debug_mask) { @@ -570,6 +569,7 @@ int set_to_intervals(struct list_head *errs, struct set *set, bool merge) { struct elementary_interval *ei, *next; + struct output_ctx debug_octx; struct seg_tree tree; LIST_HEAD(list); @@ -590,6 +590,9 @@ 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); pr_gmp_debug("\n"); } |