mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/90712: Remove unnecessary check for NULL.
** CID 90712: Dereference after null check (FORWARD_NULL) /src/nvim/getchar.c: 3654 in check_abbr() vim_strsave() never returns NULL, so q is never NULL. Removing the NULL check for q should fix this warning.
This commit is contained in:
parent
e241b0ba09
commit
ce03171323
@ -3645,10 +3645,8 @@ int check_abbr(int c, char_u *ptr, int col, int mincol)
|
|||||||
if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL) {
|
if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL) {
|
||||||
/* might have CSI escaped mp->m_keys */
|
/* might have CSI escaped mp->m_keys */
|
||||||
q = vim_strsave(mp->m_keys);
|
q = vim_strsave(mp->m_keys);
|
||||||
if (q != NULL) {
|
vim_unescape_csi(q);
|
||||||
vim_unescape_csi(q);
|
qlen = (int)STRLEN(q);
|
||||||
qlen = (int)STRLEN(q);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* find entries with right mode and keys */
|
/* find entries with right mode and keys */
|
||||||
match = (mp->m_mode & State)
|
match = (mp->m_mode & State)
|
||||||
|
Loading…
Reference in New Issue
Block a user