Mercurial > dovecot > core-2.2
changeset 18874:343602625064
lib-fs: Removed redundant o_stream_nfinish() calls
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 17 Jun 2015 12:22:17 +0300 |
parents | 21c0ffec1d2b |
children | 3ae8cf3f8320 |
files | src/lib-fs/fs-posix.c src/lib-fs/fs-randomfail.c src/lib-fs/fs-sis.c |
diffstat | 3 files changed, 0 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-fs/fs-posix.c Wed Jun 17 12:21:52 2015 +0300 +++ b/src/lib-fs/fs-posix.c Wed Jun 17 12:22:17 2015 +0300 @@ -47,7 +47,6 @@ bool seek_to_beginning; bool success; - bool open_failed; }; struct posix_fs_lock { @@ -475,7 +474,6 @@ } else if (file->fd == -1 && fs_posix_open(file) < 0) { _file->output = o_stream_create_error_str(errno, "%s", fs_file_last_error(_file)); - file->open_failed = TRUE; } else { _file->output = o_stream_create_fd_file(file->fd, (uoff_t)-1, FALSE); @@ -488,14 +486,6 @@ struct posix_fs_file *file = (struct posix_fs_file *)_file; int ret = success ? 0 : -1; - if (file->open_failed) - ret = -1; - else if (o_stream_nfinish(_file->output) < 0) { - fs_set_error(_file->fs, "write(%s) failed: %s", - o_stream_get_name(_file->output), - o_stream_get_error(_file->output)); - ret = -1; - } o_stream_destroy(&_file->output); switch (file->open_mode) {
--- a/src/lib-fs/fs-randomfail.c Wed Jun 17 12:21:52 2015 +0300 +++ b/src/lib-fs/fs-randomfail.c Wed Jun 17 12:22:17 2015 +0300 @@ -382,12 +382,6 @@ struct randomfail_fs_file *file = (struct randomfail_fs_file *)_file; if (_file->output != NULL) { - if (o_stream_nfinish(_file->output) < 0) { - fs_set_error(_file->fs, "write(%s) failed: %s", - o_stream_get_name(_file->output), - o_stream_get_error(_file->output)); - success = FALSE; - } if (_file->output == file->super_output) _file->output = NULL; else
--- a/src/lib-fs/fs-sis.c Wed Jun 17 12:21:52 2015 +0300 +++ b/src/lib-fs/fs-sis.c Wed Jun 17 12:22:17 2015 +0300 @@ -375,8 +375,6 @@ { struct sis_fs_file *file = (struct sis_fs_file *)_file; - if (o_stream_nfinish(_file->output) < 0) - success = FALSE; if (!success) { if (file->super != NULL) { fs_write_stream_abort(file->super, &file->fs_output);