[nft PATCH 02/12] libnftables: Fix forgotten bit after introducing error_fp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 src/libnftables.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/libnftables.c b/src/libnftables.c
index 44e06e1a50835..cd356250df869 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();
 
-- 
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux