From: Timo Sirainen Date: Fri, 27 Oct 2017 23:57:37 +0000 (+0300) Subject: global: Remove explicit o_stream_flush() calls from ostream.close() methods X-Git-Tag: 2.3.0.rc1~698 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bc75087b6feea54307be14ebbf009f8e9a8dd13;p=thirdparty%2Fdovecot%2Fcore.git global: Remove explicit o_stream_flush() calls from ostream.close() methods It's now being done automatically. --- diff --git a/src/lib-compression/ostream-bzlib.c b/src/lib-compression/ostream-bzlib.c index d4081d0223..fc6aabd705 100644 --- a/src/lib-compression/ostream-bzlib.c +++ b/src/lib-compression/ostream-bzlib.c @@ -25,7 +25,6 @@ static void o_stream_bzlib_close(struct iostream_private *stream, { struct bzlib_ostream *zstream = (struct bzlib_ostream *)stream; - (void)o_stream_flush(&zstream->ostream.ostream); (void)BZ2_bzCompressEnd(&zstream->zs); if (close_parent) o_stream_close(zstream->ostream.parent); diff --git a/src/lib-compression/ostream-lz4.c b/src/lib-compression/ostream-lz4.c index a71d1d3550..155572003c 100644 --- a/src/lib-compression/ostream-lz4.c +++ b/src/lib-compression/ostream-lz4.c @@ -28,7 +28,6 @@ static void o_stream_lz4_close(struct iostream_private *stream, { struct lz4_ostream *zstream = (struct lz4_ostream *)stream; - (void)o_stream_flush(&zstream->ostream.ostream); if (close_parent) o_stream_close(zstream->ostream.parent); } diff --git a/src/lib-compression/ostream-lzma.c b/src/lib-compression/ostream-lzma.c index 50552441f1..0e57286f46 100644 --- a/src/lib-compression/ostream-lzma.c +++ b/src/lib-compression/ostream-lzma.c @@ -25,7 +25,6 @@ static void o_stream_lzma_close(struct iostream_private *stream, { struct lzma_ostream *zstream = (struct lzma_ostream *)stream; - (void)o_stream_flush(&zstream->ostream.ostream); lzma_end(&zstream->strm); if (close_parent) o_stream_close(zstream->ostream.parent); diff --git a/src/lib-fs/ostream-cmp.c b/src/lib-fs/ostream-cmp.c index 3797031674..7a029a24b0 100644 --- a/src/lib-fs/ostream-cmp.c +++ b/src/lib-fs/ostream-cmp.c @@ -21,7 +21,6 @@ static void o_stream_cmp_close(struct iostream_private *stream, return; i_stream_unref(&cstream->input); - (void)o_stream_flush(&cstream->ostream.ostream); if (close_parent) o_stream_close(cstream->ostream.parent); } diff --git a/src/lib/ostream-file.c b/src/lib/ostream-file.c index aeea71530f..88fa7f24f7 100644 --- a/src/lib/ostream-file.c +++ b/src/lib/ostream-file.c @@ -52,9 +52,6 @@ void o_stream_file_close(struct iostream_private *stream, { struct file_ostream *fstream = (struct file_ostream *)stream; - /* flush output before really closing it */ - (void)o_stream_flush(&fstream->ostream.ostream); - stream_closed(fstream); } diff --git a/src/lib/ostream-multiplex.c b/src/lib/ostream-multiplex.c index 77b90f9399..9583af177c 100644 --- a/src/lib/ostream-multiplex.c +++ b/src/lib/ostream-multiplex.c @@ -131,7 +131,6 @@ o_stream_multiplex_ochannel_close(struct iostream_private *stream, bool close_pa { struct multiplex_ochannel *const *channelp; struct multiplex_ochannel *channel = (struct multiplex_ochannel*)stream; - (void)o_stream_flush(&channel->ostream.ostream); channel->closed = TRUE; if (close_parent) { diff --git a/src/lib/ostream-rawlog.c b/src/lib/ostream-rawlog.c index 647e8f8255..e83274fe76 100644 --- a/src/lib/ostream-rawlog.c +++ b/src/lib/ostream-rawlog.c @@ -15,9 +15,7 @@ static void o_stream_rawlog_close(struct iostream_private *stream, { struct rawlog_ostream *rstream = (struct rawlog_ostream *)stream; - (void)o_stream_flush(rstream->ostream.parent); iostream_rawlog_close(&rstream->riostream); - if (close_parent) o_stream_close(rstream->ostream.parent); }