projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c75173a
)
kconfig: Remove duplicate call to sym_get_string_value()
author
Mickaël Salaün
<mic@linux.microsoft.com>
Mon, 15 Feb 2021 18:15:09 +0000
(19:15 +0100)
committer
Masahiro Yamada
<masahiroy@kernel.org>
Wed, 24 Feb 2021 06:12:06 +0000
(15:12 +0900)
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>
scripts/kconfig/conf.c
patch
|
blob
|
blame
|
history
diff --git
a/scripts/kconfig/conf.c
b/scripts/kconfig/conf.c
index db03e2f45de4202496f466b8ad5b9418690de09f..18a233d27a8d2c6212d3cc8efe83ff86091fbec9 100644
(file)
--- 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;