X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=config%2Fzconf.y;h=c292f27d41d883a707b533bc9c7e5556e81cd8d2;hb=120e44ad1fcc23e18af4084d9f02d135854728fd;hp=1aa9859726b365f732787d54d350d560c8a94f1a;hpb=3dc782557da1337d56609efe08d2000ea41f9890;p=carl9170fw.git diff --git a/config/zconf.y b/config/zconf.y index 1aa9859..c292f27 100644 --- a/config/zconf.y +++ b/config/zconf.y @@ -127,7 +127,7 @@ no_mainmenu_stmt: /* empty */ * later regardless of whether it comes from the 'prompt' in * mainmenu_stmt or here */ - menu_add_prompt(P_MENU, strdup("Linux Kernel Configuration"), NULL); + menu_add_prompt(P_MENU, xstrdup("Linux Kernel Configuration"), NULL); }; @@ -276,6 +276,7 @@ choice: T_CHOICE word_opt T_EOL sym->flags |= SYMBOL_AUTO; menu_add_entry(sym); menu_add_expr(P_CHOICE, NULL, NULL); + free($2); printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); }; @@ -436,6 +437,12 @@ help: help_start T_HELPTEXT zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used", current_entry->sym->name ?: ""); } + + /* Is the help text empty or all whitespace? */ + if ($2[strspn($2, " \f\n\r\t\v")] == '\0') + zconfprint("warning: '%s' defined with blank help text", + current_entry->sym->name ?: ""); + current_entry->help = $2; };