Skip to content

Commit

Permalink
global: Remove explicit o_stream_flush() calls from ostream.close() m…
Browse files Browse the repository at this point in the history
…ethods

It's now being done automatically.
  • Loading branch information
sirainen authored and Timo Sirainen committed Oct 30, 2017
1 parent 5ec4fc4 commit 5bc7508
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/lib-compression/ostream-bzlib.c
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/lib-compression/ostream-lz4.c
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion src/lib-compression/ostream-lzma.c
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/lib-fs/ostream-cmp.c
Expand Up @@ -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);
}
Expand Down
3 changes: 0 additions & 3 deletions src/lib/ostream-file.c
Expand Up @@ -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);
}

Expand Down
1 change: 0 additions & 1 deletion src/lib/ostream-multiplex.c
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions src/lib/ostream-rawlog.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5bc7508

Please sign in to comment.