From: Mickaël Salaün Date: Mon, 15 Feb 2021 18:15:09 +0000 (+0100) Subject: kconfig: Remove duplicate call to sym_get_string_value() X-Git-Tag: v5.12-rc1~35^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f82bd80d37ecc6ebda389473bd8414e89bbdbe05;p=thirdparty%2Fkernel%2Flinux.git kconfig: Remove duplicate call to sym_get_string_value() Use the saved returned value of sym_get_string_value() instead of calling it twice. Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20210215181511.2840674-2-mic@digikod.net Signed-off-by: Masahiro Yamada --- diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index db03e2f45de42..18a233d27a8d2 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -137,7 +137,7 @@ static int conf_string(struct menu *menu) printf("%*s%s ", indent - 1, "", menu->prompt->text); printf("(%s) ", sym->name); def = sym_get_string_value(sym); - if (sym_get_string_value(sym)) + if (def) printf("[%s] ", def); if (!conf_askvalue(sym, def)) return 0;