aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2018-04-15 20:27:41 +0300
committerZyX <kp-pav@yandex.ru>2018-04-15 20:27:41 +0300
commit1fb4282f1cc9586c687144ce155bc0535484ff25 (patch)
tree945f3c2aee8efd8124e32c2e34b92c8e6775e20d
parent11f64117718d2a5c94772764eb59dce4f54b2eeb (diff)
downloadrneovim-1fb4282f1cc9586c687144ce155bc0535484ff25.tar.gz
rneovim-1fb4282f1cc9586c687144ce155bc0535484ff25.tar.bz2
rneovim-1fb4282f1cc9586c687144ce155bc0535484ff25.zip
fileio: Fix PVS/V560: end was already checked
See condition at line 3309.
-rw-r--r--src/nvim/fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 52686f6651..31f970ef7a 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -3332,9 +3332,9 @@ restore_backup:
*s++ = NL;
}
}
- if (++len == bufsize && end) {
+ if (++len == bufsize) {
if (buf_write_bytes(&write_info) == FAIL) {
- end = 0; /* write error: break loop */
+ end = 0; // Write error: break loop.
break;
}
nchars += bufsize;
@@ -3343,7 +3343,7 @@ restore_backup:
os_breakcheck();
if (got_int) {
- end = 0; /* Interrupted, break loop */
+ end = 0; // Interrupted, break loop.
break;
}
}