mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
3189841984
commit
b8f69b6b9a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user