diff options
author | Phil Sutter <phil@nwl.cc> | 2018-04-13 16:52:25 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-04-14 13:53:02 +0200 |
commit | 6e4bbbb278a50e61b6c219680004e7bd4480137c (patch) | |
tree | cfb345a9384d2e18b8a625c81df749d6d660bc81 /src/libnftables.c | |
parent | 2f86dd5a43baf22a6d27fd74f38da37aa28bbaf8 (diff) |
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 <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/libnftables.c')
-rw-r--r-- | src/libnftables.c | 3 |
1 files changed, 0 insertions, 3 deletions
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(); |