0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd::fs: Relax assertions matching empty file reads on asio path.

This commit is contained in:
Jason Volk 2023-02-13 19:57:31 -08:00
parent fb162605a6
commit 7320ea0fcb

View file

@ -1055,7 +1055,6 @@ ircd::fs::_read_asio(const fd &fd,
const const_iovec_view &iov,
const read_opts &opts)
{
assert(bytes(iov) > 0);
assert(opts.offset >= 0);
asio::mutable_buffer buf[iov.size()];
@ -1092,7 +1091,7 @@ ircd::fs::_read_asio(const fd &fd,
};
assert(ret <= bytes(iov));
assert(ret || ec == eof);
assert(ret || ec == eof || !bytes(iov));
if(unlikely(ec && ec != eof))
throw_system_error(ec);