summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 6d2422ff..fc79cfaa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -415,11 +415,9 @@ int main(int argc, char * const *argv)
bool interactive = false;
struct parser_state state;
int i, val, rc;
- FILE *outfp = fdopen(dup(STDOUT_FILENO), "w");
nft = nft_ctx_new(NFT_CTX_DEFAULT);
- nft_ctx_set_output(nft, outfp);
- close(STDOUT_FILENO);
+ nft_ctx_set_output(nft, stdout);
while (1) {
val = getopt_long(argc, argv, OPTSTRING, options, NULL);