aboutsummaryrefslogtreecommitdiffstats
path: root/common/estream.c
diff options
context:
space:
mode:
authorDaiki Ueno <[email protected]>2013-04-02 06:45:58 +0000
committerWerner Koch <[email protected]>2013-04-19 10:16:56 +0000
commite498180d5647d3427a7d7e6c82a9f09cf1ba439d (patch)
tree916c924d28ab75f0fe518366393498855e70f0a2 /common/estream.c
parentdoc: Formatting fixes. (diff)
downloadgnupg-e498180d5647d3427a7d7e6c82a9f09cf1ba439d.tar.gz
gnupg-e498180d5647d3427a7d7e6c82a9f09cf1ba439d.zip
Make sure to call fflush if estream_t is backed with stdio
* common/estream.c (es_func_fp_write): Call fflush after fwrite.
Diffstat (limited to 'common/estream.c')
-rw-r--r--common/estream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/estream.c b/common/estream.c
index 79fa40522..79e3efbb1 100644
--- a/common/estream.c
+++ b/common/estream.c
@@ -1275,6 +1275,7 @@ es_func_fp_write (void *cookie, const void *buffer, size_t size)
#else
bytes_written = fwrite (buffer, 1, size, file_cookie->fp);
#endif
+ fflush (file_cookie->fp);
}
else
bytes_written = size; /* Successfully written to the bit bucket. */