]> git.dujemihanovic.xyz Git - linux.git/commitdiff
kconfig: remove unneeded if-conditional in conf_choice()
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 21 Apr 2024 11:13:02 +0000 (20:13 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Thu, 2 May 2024 10:48:26 +0000 (19:48 +0900)
All symbols except choices have a name.

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

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/conf.c

index 965bb40c50e5170a1341d662e5be7607a866e928..0156ca13f949c5c9929eb41e26d517ad0ffaf346 100644 (file)
@@ -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");