From 0879126bb44aa9761a920946f35f5aa697717445 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 10 Nov 2022 12:53:45 -0500 Subject: Try to report I/O errors earlier and only once --- src/parse.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index 74f160c..47f4bec 100644 --- a/src/parse.c +++ b/src/parse.c @@ -481,6 +481,7 @@ static void init_print_expr(struct parser_state *state, struct bfs_expr *expr) { expr_set_always_true(expr); expr->cost = PRINT_COST; expr->cfile = state->ctx->cout; + expr->path = NULL; } /** @@ -512,6 +513,7 @@ static int expr_open(struct parser_state *state, struct bfs_expr *expr, const ch } expr->cfile = dedup; + expr->path = path; return 0; fail: -- cgit v1.2.3