0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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.
This commit is contained in:
Bram Moolenaar
2021-02-03 20:14:23 +01:00
parent fef8064b54
commit 2c363a2e95
2 changed files with 7 additions and 1 deletions

View File

@@ -6277,7 +6277,11 @@ spell_add_word(
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)