Skip to content

Commit

Permalink
kconfig: Remove duplicate call to sym_get_string_value()
Browse files Browse the repository at this point in the history
Use the saved returned value of sym_get_string_value() instead of
calling it twice.

Signed-off-by: Mickaël Salaün <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
l0kod authored and masahir0y committed Feb 24, 2021
1 parent c75173a commit f82bd80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f82bd80

Please sign in to comment.