Skip to content

Commit c2af3d0

Browse files
committed
kconfig: remove unneeded if-conditional in conf_choice()
All symbols except choices have a name. child->sym->name never becomes NULL inside choice blocks. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 03c4eca commit c2af3d0

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

scripts/kconfig/conf.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,8 @@ static int conf_choice(struct menu *menu)
497497
printf("%*c", indent, '>');
498498
} else
499499
printf("%*c", indent, ' ');
500-
printf(" %d. %s", cnt, menu_get_prompt(child));
501-
if (child->sym->name)
502-
printf(" (%s)", child->sym->name);
500+
printf(" %d. %s (%s)", cnt, menu_get_prompt(child),
501+
child->sym->name);
503502
if (!sym_has_value(child->sym))
504503
printf(" (NEW)");
505504
printf("\n");

0 commit comments

Comments
 (0)