summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMickaël Salaün <mic@linux.microsoft.com>2021-02-15 19:15:09 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2021-02-24 07:12:06 +0100
commitf82bd80d37ecc6ebda389473bd8414e89bbdbe05 (patch)
tree71d0c538b0c8236fe3d61d01d91662cfa3d59745 /scripts
parentMakefile: Remove # characters from compiler string (diff)
downloadlinux-f82bd80d37ecc6ebda389473bd8414e89bbdbe05.tar.xz
linux-f82bd80d37ecc6ebda389473bd8414e89bbdbe05.zip
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 <mic@linux.microsoft.com> Link: https://lore.kernel.org/r/20210215181511.2840674-2-mic@digikod.net Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index db03e2f45de4..18a233d27a8d 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;