Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: remember the current choice while parsing the choice block

Instead of the boolean flag, it will be more useful to remember the
current choice being parsed.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+4 -6
+4 -6
scripts/kconfig/parser.y
··· 28 28 static bool zconf_endtoken(const char *tokenname, 29 29 const char *expected_tokenname); 30 30 31 - struct menu *current_menu, *current_entry; 32 - 33 - static bool inside_choice = false; 31 + struct menu *current_menu, *current_entry, *current_choice; 34 32 35 33 %} 36 34 ··· 145 147 146 148 config_stmt: config_entry_start config_option_list 147 149 { 148 - if (inside_choice) { 150 + if (current_choice) { 149 151 if (!current_entry->prompt) { 150 152 fprintf(stderr, "%s:%d: error: choice member must have a prompt\n", 151 153 current_entry->filename, current_entry->lineno); ··· 254 256 255 257 $$ = menu_add_menu(); 256 258 257 - inside_choice = true; 259 + current_choice = current_entry; 258 260 }; 259 261 260 262 choice_end: end 261 263 { 262 - inside_choice = false; 264 + current_choice = NULL; 263 265 264 266 if (zconf_endtoken($1, "choice")) { 265 267 menu_end_menu();