From 6e4bbbb278a50e61b6c219680004e7bd4480137c Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 13 Apr 2018 16:52:25 +0200 Subject: libnftables: Fix forgotten bit after introducing error_fp Like nft_run_cmd_from_buffer, nft_run_cmd_from_filename doesn't need to change output_fp temporarily when printing error records anymore. Fixes: 4176e24e14f07 ("libnftables: Introduce nft_ctx_set_error()") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- src/libnftables.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/libnftables.c b/src/libnftables.c index 44e06e1a..cd356250 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -433,7 +433,6 @@ int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename) LIST_HEAD(msgs); void *scanner; int rc; - FILE *fp; rc = cache_update(nft->nf_sock, &nft->cache, CMD_INVALID, &msgs, nft->debug_mask, &nft->output); @@ -454,9 +453,7 @@ int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename) if (nft_run(nft, nft->nf_sock, scanner, &state, &msgs) != 0) rc = -1; err: - fp = nft_ctx_set_output(nft, stderr); erec_print_list(&nft->output, &msgs, nft->debug_mask); - nft_ctx_set_output(nft, fp); scanner_destroy(scanner); iface_cache_release(); -- cgit v1.2.3