提交 f82bd80d 编写于 作者: M Mickaël Salaün 提交者: Masahiro Yamada

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: NMickaël Salaün <mic@linux.microsoft.com>
Link: https://lore.kernel.org/r/20210215181511.2840674-2-mic@digikod.netSigned-off-by: NMasahiro Yamada <masahiroy@kernel.org>
上级 c75173a2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册