commit | 2c363a2e95ee0b366e72063d093d20e025ef4a66 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Wed Feb 03 20:14:23 2021 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Wed Feb 03 20:14:23 2021 +0100 |
tree | 623706be72c60a05897fa5cc1ac8e6cd849f04ba | |
parent | fef8064b54ad0b1a7ce2f9cf024526627e6bdf57 [diff] [blame] |
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.
diff --git a/src/spellfile.c b/src/spellfile.c index 869db7f..2018169 100644 --- a/src/spellfile.c +++ b/src/spellfile.c
@@ -6277,7 +6277,11 @@ len, word, NameBuff); } } - fseek(fd, fpos_next, SEEK_SET); + if (fseek(fd, fpos_next, SEEK_SET) != 0) + { + PERROR(_("Seek error in spellfile")); + break; + } } } if (fd != NULL)