diff options
author | ZyX <kp-pav@yandex.ru> | 2018-04-15 20:34:27 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-04-15 20:34:27 +0300 |
commit | b8f69b6b9a1b5339ba580e58725b8866339c1ad7 (patch) | |
tree | e822a9904304d8bcbbc80effa3b20df20912d15e | |
parent | 31898419849f9389cb47d7a26dda600fc8951eb9 (diff) | |
download | rneovim-b8f69b6b9a1b5339ba580e58725b8866339c1ad7.tar.gz rneovim-b8f69b6b9a1b5339ba580e58725b8866339c1ad7.tar.bz2 rneovim-b8f69b6b9a1b5339ba580e58725b8866339c1ad7.zip |
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.
-rw-r--r-- | src/nvim/os/fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index b7c2714296..924b3d2359 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -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) { |