remove redundant condition on tty_add_menu()

`newstr` is assigned to `str` or `buf`.
`buf` is an address of an array, and `str` is guarded,
so both are non-NULL.
This commit is contained in:
SHIRAKATA Kentaro
2022-02-09 03:44:04 +09:00
committed by PatR
parent 140077b163
commit 0be21a231c

View File

@@ -3036,7 +3036,7 @@ tty_add_menu(winid window, /* window to use, must be of type NHW_MENU */
item->selector = ch;
item->gselector = gch;
item->attr = attr;
item->str = dupstr(newstr ? newstr : "");
item->str = dupstr(newstr);
item->next = cw->mlist;
cw->mlist = item;