diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-06 08:59:13 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-05-06 08:59:13 +0200 |
commit | 5faed57ac70ef637a2bce25e03458e976f8c8969 (patch) | |
tree | bb60ebb28cd28abbc6fecbcf590a2fa3c29a09c6 | |
parent | 4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771 (diff) | |
download | rneovim-5faed57ac70ef637a2bce25e03458e976f8c8969.tar.gz rneovim-5faed57ac70ef637a2bce25e03458e976f8c8969.tar.bz2 rneovim-5faed57ac70ef637a2bce25e03458e976f8c8969.zip |
PVS/V571: condition was already verified
-rw-r--r-- | src/nvim/menu.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 523bb20738..472481bb30 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -774,15 +774,12 @@ static vimmenu_T *find_menu(vimmenu_T *menu, char_u *name, int modes) if (menu_name_equal(name, menu)) { // Found menu if (*p != NUL && menu->children == NULL) { - if (*p != NUL) { EMSG(_(e_notsubmenu)); return NULL; - } else if ((menu->modes & modes) == 0x0) { - EMSG(_(e_othermode)); - return NULL; - } - } - if (*p == NUL) { // found a full match + } else if ((menu->modes & modes) == 0x0) { + EMSG(_(e_othermode)); + return NULL; + } else if (*p == NUL) { // found a full match return menu; } break; |