Skip to contentSkip to conversation

kconfig/nconf: nuke unreferenced `nohelp_text'

PATCH In review Arnaud Lacombe 2 participants 5 messages Aug 4, 2011 – Aug 8, 2011

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

PATCH 1/2 kconfig/nconf: nuke unreferenced `nohelp_text'

After commit 5416857867c9cc94aba641898c567d9707de30f1, 1nohelp_text' is no longer referenced, nuke it.

---
 scripts/kconfig/nconf.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
scripts/kconfig/nconf.c +0 -2
index 39ca1f1..b113c50 100644
@@ -182,8 +182,6 @@ setmod_text[] = N_(
 "This feature depends on another which\n"
 "has been configured as a module.\n"
 "As a result, this feature will be built as a module."),
-nohelp_text[] = N_(
-"There is no help available for this option.\n"),
 load_config_text[] = N_(
 "Enter the name of the configuration file you wish to load.\n"
 "Accept the name shown to restore the configuration you\n"
Signature · 1 line
1.7.6.153.g78432
#1 lore raw

PATCH 2/2 kconfig: factor code in menu_get_ext_help()

Cc Srinivas Kandagatla <[email protected]>
---
 scripts/kconfig/menu.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
scripts/kconfig/menu.c +4 -6
index beeb92e..8c2a97e 100644
@@ -10,8 +10,7 @@
 
 #include "lkc.h"
 
-static const char nohelp_text[] = N_(
-	"There is no help available for this option.\n");
+static const char nohelp_text[] = "There is no help available for this option.";
 
 struct menu rootmenu;
 static struct menu **last_entry_ptr;
@@ -595,15 +594,14 @@ struct gstr get_relations_str(struct symbol **sym_arr)
 void menu_get_ext_help(struct menu *menu, struct gstr *help)
 {
 	struct symbol *sym = menu->sym;
+	const char *help_text = nohelp_text;
 
 	if (menu_has_help(menu)) {
 		if (sym->name)
 			str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
-		str_append(help, _(menu_get_help(menu)));
-		str_append(help, "\n");
-	} else {
-		str_append(help, nohelp_text);
+		help_text = menu_get_help(menu);
 	}
+	str_printf(help, "%s\n", _(help_text));
 	if (sym)
 		get_symbol_str(help, sym);
 }
Signature · 1 line
1.7.6.153.g78432
#3 lore raw
In reply to Arnaud Lacombe

Hi,

Quoted 1 line · Arnaud Lacombe

After commit 5416857867c9cc94aba641898c567d9707de30f1, 1nohelp_text' is no

                                                         ^

this should read `nohelp_text', sorry for the typo :/

- Arnaud

Quoted 24 lines

longer referenced, nuke it.

---
 scripts/kconfig/nconf.c |    2 --

 1 files changed, 0 insertions(+), 2 deletions(-)
scripts/kconfig/nconf.c +0 -0
index 39ca1f1..b113c50 100644
@@ -182,8 +182,6 @@ setmod_text[] = N_(

 "This feature depends on another which\n"
 "has been configured as a module.\n"
 "As a result, this feature will be built as a module."), -nohelp_text[] = N_(
-"There is no help available for this option.\n"), load_config_text[] = N_(
 "Enter the name of the configuration file you wish to load.\n" "Accept the name shown to restore the configuration you\n" --
1.7.6.153.g78432