aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2020-01-26 13:27:51 +0200
committerLasse Collin <lasse.collin@tukaani.org>2020-02-05 22:00:28 +0200
commit15b55d5c63d27f81776edb1abc05872a751fc674 (patch)
treee436ba0561d425ed3db26408fb7443df2268b824 /src
parentxz: Enable Capsicum sandboxing by default if available. (diff)
downloadxz-15b55d5c63d27f81776edb1abc05872a751fc674.tar.xz
xz: Move the setting of flush_needed in file_io.c to a nicer location.
Diffstat (limited to 'src')
-rw-r--r--src/xz/file_io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xz/file_io.c b/src/xz/file_io.c
index 6db62e76..a73efcb9 100644
--- a/src/xz/file_io.c
+++ b/src/xz/file_io.c
@@ -266,11 +266,8 @@ io_wait(file_pair *pair, int timeout, bool is_reading)
return IO_WAIT_ERROR;
}
- if (ret == 0) {
- assert(opt_flush_timeout != 0);
- flush_needed = true;
+ if (ret == 0)
return IO_WAIT_TIMEOUT;
- }
if (pfd[0].revents != 0)
return IO_WAIT_MORE;
@@ -1147,6 +1144,7 @@ io_read(file_pair *pair, io_buf *buf_union, size_t size)
return SIZE_MAX;
case IO_WAIT_TIMEOUT:
+ flush_needed = true;
return size - left;
default: