Skip to contentSkip to conversation

kconfig: remove unneeded if-conditional in conf_choice()

PATCH New Masahiro Yamada 1 participant 1 message Apr 21, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kconfig: remove unneeded if-conditional in conf_choice()

All symbols except choices have a name.

child->sym->name never becomes NULL inside choice blocks.

---

 scripts/kconfig/conf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
scripts/kconfig/conf.c +2 -3
index 965bb40c50e5..0156ca13f949 100644
@@ -497,9 +497,8 @@ static int conf_choice(struct menu *menu)
 				printf("%*c", indent, '>');
 			} else
 				printf("%*c", indent, ' ');
-			printf(" %d. %s", cnt, menu_get_prompt(child));
-			if (child->sym->name)
-				printf(" (%s)", child->sym->name);
+			printf(" %d. %s (%s)", cnt, menu_get_prompt(child),
+			       child->sym->name);
 			if (!sym_has_value(child->sym))
 				printf(" (NEW)");
 			printf("\n");
Signature · 1 line
2.40.1