From: Masahiro Yamada Date: Wed, 28 Feb 2018 00:15:21 +0000 (+0900) Subject: kconfig: do not call check_conf() for olddefconfig X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=2e9de4821d4aa774d999a0d217159d33ea7b6517;p=carl9170fw.git kconfig: do not call check_conf() for olddefconfig check_conf() traverses the menu tree, but it is completely no-op for olddefconfig because the following if-else block does nothing. if (input_mode == listnewconfig) { ... } else if (input_mode != olddefconfig) { ... } As the help message says, olddefconfig automatically sets new symbols to their default value. There is no room for manual intervention. So, calling check_conf() for olddefconfig is odd in the first place. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson Signed-off-by: Christian Lamparter --- diff --git a/config/conf.c b/config/conf.c index 392cefd..0d21a01 100644 --- a/config/conf.c +++ b/config/conf.c @@ -419,7 +419,7 @@ static void check_conf(struct menu *menu) if (sym->name && !sym_is_choice_value(sym)) { printf("%s%s\n", CONFIG_, sym->name); } - } else if (input_mode != oldnoconfig) { + } else { if (!conf_cnt++) printf(_("*\n* Restart config...\n*\n")); rootEntry = menu_get_parent_menu(menu); @@ -630,9 +630,7 @@ int main(int ac, char **av) do { conf_cnt = 0; check_conf(&rootmenu); - } while (conf_cnt && - (input_mode != listnewconfig && - input_mode != oldnoconfig)); + } while (conf_cnt && input_mode != listnewconfig); break; }