diff --git a/src/libnftables.c b/src/libnftables.c index af4734c05004..89317f9f6049 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -807,8 +807,7 @@ int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename) if (!strcmp(filename, "-")) filename = "/dev/stdin"; - if (!strcmp(filename, "/dev/stdin") && - !nft_output_json(&nft->output)) + if (!strcmp(filename, "/dev/stdin")) nft->stdin_buf = stdin_to_buffer(); if (!nft->stdin_buf &&