diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-04-11 04:45:33 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-04-14 15:22:49 +0900 |
commit | 16b0e10238b45251790ea1a2683855d4f8f3c1a3 (patch) | |
tree | 125195762060018ef367710c189f53914e37c4c7 /scripts/kconfig/nconf.c | |
parent | 2ba50da9ec34196a895b4947dc6bb1dbf1ace670 (diff) | |
download | linux-16b0e10238b45251790ea1a2683855d4f8f3c1a3.tar.gz linux-16b0e10238b45251790ea1a2683855d4f8f3c1a3.tar.bz2 linux-16b0e10238b45251790ea1a2683855d4f8f3c1a3.zip |
kconfig: nconf: remove unneeded default for menu prompt
The rootmenu always has a prompt even if the 'mainmenu' statement is
missing in the top Kconfig file.
conf_parse() calls menu_add_prompt(P_MENU, "Main menu", NULL) in this
case.
So, every 'menu' has a prompt.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/nconf.c')
-rw-r--r-- | scripts/kconfig/nconf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index bcfcf0b87a7a..8187a2ef837d 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -1066,7 +1066,6 @@ static int do_match(int key, struct match_state *state, int *ans) static void conf(struct menu *menu) { struct menu *submenu = NULL; - const char *prompt = menu_get_prompt(menu); struct symbol *sym; int res; int current_index = 0; @@ -1084,9 +1083,8 @@ static void conf(struct menu *menu) if (!child_count) break; - show_menu(prompt ? prompt : "Main Menu", - menu_instructions, - current_index, &last_top_row); + show_menu(menu_get_prompt(menu), menu_instructions, + current_index, &last_top_row); keypad((menu_win(curses_menu)), TRUE); while (!global_exit) { if (match_state.in_search) { |