1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

xz: Move the setting of flush_needed in file_io.c to a nicer location.

This commit is contained in:
Lasse Collin 2020-01-26 13:27:51 +02:00
parent cf2df0f05a
commit 3333ba4a67

View file

@ -266,11 +266,8 @@ io_wait(file_pair *pair, int timeout, bool is_reading)
return IO_WAIT_ERROR; return IO_WAIT_ERROR;
} }
if (ret == 0) { if (ret == 0)
assert(opt_flush_timeout != 0);
flush_needed = true;
return IO_WAIT_TIMEOUT; return IO_WAIT_TIMEOUT;
}
if (pfd[0].revents != 0) if (pfd[0].revents != 0)
return IO_WAIT_MORE; return IO_WAIT_MORE;
@ -1147,6 +1144,7 @@ io_read(file_pair *pair, io_buf *buf_union, size_t size)
return SIZE_MAX; return SIZE_MAX;
case IO_WAIT_TIMEOUT: case IO_WAIT_TIMEOUT:
flush_needed = true;
return size - left; return size - left;
default: default: