]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Remove explicit o_stream_flush() calls from ostream.close() methods
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 27 Oct 2017 23:57:37 +0000 (02:57 +0300)
committerTimo Sirainen <tss@dovecot.fi>
Mon, 30 Oct 2017 11:04:53 +0000 (13:04 +0200)
It's now being done automatically.

src/lib-compression/ostream-bzlib.c
src/lib-compression/ostream-lz4.c
src/lib-compression/ostream-lzma.c
src/lib-fs/ostream-cmp.c
src/lib/ostream-file.c
src/lib/ostream-multiplex.c
src/lib/ostream-rawlog.c

index d4081d022377cbd5f3f7f3680a68bdd7d6e157bb..fc6aabd7051e1a35668a856765e487d63fff1fa2 100644 (file)
@@ -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);
index a71d1d35509c1431de5ab1c52b92dec266994bac..155572003c742549915425cd7671a7b05e694ac7 100644 (file)
@@ -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);
 }
index 50552441f1162699677a2e3a5c09c3509bc344a4..0e57286f464ac85302604082d12643db8b910298 100644 (file)
@@ -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);
index 37970316745632723ff98be4ba292f786be07997..7a029a24b0e71d1276bd60b60d94b2b50a491c1b 100644 (file)
@@ -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);
 }
index aeea71530fb64c56dd7f05c29abe8992f0277d3f..88fa7f24f78f85cf8899289152c38c595a7258ba 100644 (file)
@@ -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);
 }
 
index 77b90f9399cfd77f73cb1d3a9ca208803659da12..9583af177cb64b28e7aa18c9a43ea5cba1912307 100644 (file)
@@ -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) {
index 647e8f82553dc06725ba2514a8474dbbce61dc09..e83274fe764b5556f907e01032cae6ccb7d8c71a 100644 (file)
@@ -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);
 }