From a494bf847d7370d53db66a7f5382365cc11af0f0 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 20 May 2017 04:39:55 +0300 Subject: 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. --- src/nvim/tui/tui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 and are now the same, redefine ." - 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; } } -- cgit