refactor: add function attributes to xmemcpyz() (#28435)

Also attempt to fix the new coverity warning.
This commit is contained in:
zeertzjq
2024-04-21 16:44:40 +08:00
committed by GitHub
parent 2b6c9bbe7f
commit 6d732ad3c9
3 changed files with 5 additions and 5 deletions

View File

@@ -561,6 +561,7 @@ void spell_suggest(int count)
xstrlcpy(wcopy, stp->st_word, MAXWLEN + 1);
int el = sug.su_badlen - stp->st_orglen;
if (el > 0 && stp->st_wordlen + el <= MAXWLEN) {
assert(sug.su_badptr != NULL);
xmemcpyz(wcopy + stp->st_wordlen, sug.su_badptr + stp->st_orglen, (size_t)el);
}
vim_snprintf(IObuff, IOSIZE, "%2d", i + 1);