From 02cda35cf7258e1d33c86f792aec30bd506221dc Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 3 Feb 2021 18:36:27 -0500 Subject: 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 --- src/nvim/spellfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; } } -- cgit