diff options
author | ZyX <kp-pav@yandex.ru> | 2017-05-20 04:39:55 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-05-20 04:47:01 +0300 |
commit | a494bf847d7370d53db66a7f5382365cc11af0f0 (patch) | |
tree | f68b29f1c9ca6f229282ee03ec8d80264f8ed446 | |
parent | d9398982ea1688979cb1fbc0c33ef63605aa3b9f (diff) | |
download | rneovim-a494bf847d7370d53db66a7f5382365cc11af0f0.tar.gz rneovim-a494bf847d7370d53db66a7f5382365cc11af0f0.tar.bz2 rneovim-a494bf847d7370d53db66a7f5382365cc11af0f0.zip |
tui: Fix V547: always true condition
The variable in question is initalized at the start of the function with
something non-NULL, specifically pointer to a static buffer.
-rw-r--r-- | src/nvim/tui/tui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index ee73a7664e..4ff7993f4a 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1123,13 +1123,13 @@ static const char *tui_tk_ti_getstr(const char *name, const char *value, if (strequal(name, "key_backspace")) { ILOG("libtermkey:kbs=%s", value); - if (stty_erase != NULL && stty_erase[0] != 0) { + if (stty_erase[0] != 0) { return stty_erase; } } else if (strequal(name, "key_dc")) { ILOG("libtermkey:kdch1=%s", value); // Vim: "If <BS> and <DEL> are now the same, redefine <DEL>." - if (stty_erase != NULL && value != NULL && strequal(stty_erase, value)) { + if (value != NULL && strequal(stty_erase, value)) { return stty_erase[0] == DEL ? CTRL_H_STR : DEL_STR; } } |