aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-03 18:36:27 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-03 18:37:32 -0500
commit02cda35cf7258e1d33c86f792aec30bd506221dc (patch)
tree5430045222b37e262385fbbe45f1d83c33245027
parent8d3baf07910b15a57119fe063bee67ec07d57efa (diff)
downloadrneovim-02cda35cf7258e1d33c86f792aec30bd506221dc.tar.gz
rneovim-02cda35cf7258e1d33c86f792aec30bd506221dc.tar.bz2
rneovim-02cda35cf7258e1d33c86f792aec30bd506221dc.zip
vim-patch:8.2.2462: Coverity warns for not checking for fseek() error
Problem: Coverity warns for not checking for fseek() error. Solution: Give an error message if fseek() fails. https://github.com/vim/vim/commit/2c363a2e95ee0b366e72063d093d20e025ef4a66
-rw-r--r--src/nvim/spellfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
index 90af010164..3c125959a9 100644
--- a/src/nvim/spellfile.c
+++ b/src/nvim/spellfile.c
@@ -5387,7 +5387,8 @@ spell_add_word (
len, word, NameBuff);
}
}
- if (fseek(fd, fpos_next, SEEK_SET) <= 0) {
+ if (fseek(fd, fpos_next, SEEK_SET) != 0) {
+ PERROR(_("Seek error in spellfile"));
break;
}
}