os/fs: Fix PVS/V560: condition was already checked in while()

It is not possible to enter while loop body with unsigned2 == 0 if loop 
condition requires unsigned1 < unsigned2.
This commit is contained in:
ZyX 2018-04-15 20:34:27 +03:00
parent 3189841984
commit b8f69b6b9a

View File

@ -512,7 +512,7 @@ ptrdiff_t os_readv(int fd, bool *ret_eof, struct iovec *iov, size_t iov_size)
}
while (read_bytes < toread && iov_size && !*ret_eof) {
ptrdiff_t cur_read_bytes = readv(fd, iov, (int)iov_size);
if (toread && cur_read_bytes == 0) {
if (cur_read_bytes == 0) {
*ret_eof = true;
}
if (cur_read_bytes > 0) {