kconfig: m/nconf: merge two item_add_str() calls
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 10 May 2024 10:23:23 +0000 (19:23 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 14 May 2024 14:36:19 +0000 (23:36 +0900)
Just trivial cleanups.

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

index 90cd59a96aacb4b7ae60598d3eb771c38f15d976..d6a61ca1a9847796b374e48b6a516b3501f01550 100644 (file)
@@ -541,10 +541,8 @@ static void build_conf(struct menu *menu)
 
                item_add_str("%*c%s", indent + 1, ' ', menu_get_prompt(menu));
                if (val == yes) {
-                       if (def_menu) {
-                               item_add_str(" (%s)", menu_get_prompt(def_menu));
-                               item_add_str("  --->");
-                       }
+                       if (def_menu)
+                               item_add_str(" (%s)  --->", menu_get_prompt(def_menu));
                        return;
                }
        } else {
index 93047cd28f3fd449a8b10195cd40d4a35fb1f5fb..e1cb09418cbe78ec3418a4ee7a393cff836f2fb9 100644 (file)
@@ -845,11 +845,8 @@ static void build_conf(struct menu *menu)
                item_add_str("%*c%s", indent + 1,
                                ' ', menu_get_prompt(menu));
                if (val == yes) {
-                       if (def_menu) {
-                               item_add_str(" (%s)",
-                                       menu_get_prompt(def_menu));
-                               item_add_str("  --->");
-                       }
+                       if (def_menu)
+                               item_add_str(" (%s)  --->", menu_get_prompt(def_menu));
                        return;
                }
        } else {