From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Eric Leblond <eric@regit.org>,
Florian Westphal <fw@strlen.de>
Subject: [nft PATCH 1/2] main: Flush output from nft_gmp_print()
Date: Fri, 29 Sep 2017 13:26:21 +0200 [thread overview]
Message-ID: <20170929112622.11686-2-phil@nwl.cc> (raw)
In-Reply-To: <20170929112622.11686-1-phil@nwl.cc>
This adds a missing call to fflush() to nft_gmp_print() just like in
nft_print(). This is strictly not necessary since usually
nft_gmp_print() is followed by a call to nft_print() but better not rely
upon this assumption.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
src/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main.c b/src/main.c
index 079a05b80e511..6d2422ffeccf9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -403,6 +403,7 @@ int nft_gmp_print(struct output_ctx *octx, const char *fmt, ...)
va_start(arg, fmt);
ret = gmp_vfprintf(octx->output_fp, fmt, arg);
va_end(arg);
+ fflush(octx->output_fp);
return ret;
}
--
2.13.1
next prev parent reply other threads:[~2017-09-29 11:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 11:26 [nft PATCH 0/2] Follow-up on nft_print() enhancement Phil Sutter
2017-09-29 11:26 ` Phil Sutter [this message]
2017-09-29 11:26 ` [nft PATCH 2/2] main: Drop stdout hack to expose nft_print() implementation issues Phil Sutter
2017-09-29 11:27 ` [nft PATCH 0/2] Follow-up on nft_print() enhancement Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170929112622.11686-2-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=eric@regit.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).