diff options
author | Arnaud Lacombe <lacombar@gmail.com> | 2011-08-04 03:52:07 +0200 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2011-08-08 16:02:03 +0200 |
commit | 57e6292da67c30acf92f08604f918192a886838a (patch) | |
tree | 21ac23aac492de4a678b64eb5b49226cfc442db2 /scripts/kconfig/menu.c | |
parent | kbuild: Fix help text not displayed in choice option. (diff) | |
download | linux-57e6292da67c30acf92f08604f918192a886838a.tar.xz linux-57e6292da67c30acf92f08604f918192a886838a.zip |
kconfig: factor code in menu_get_ext_help()
Cc: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r-- | scripts/kconfig/menu.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index beeb92e75f8f..8c2a97e60faf 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -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); } |