Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kconfig: truncate too long menu lines in menuconfig

menu lines wrapped over too lines when too long - truncate them.
Also fixed a coding style issue

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

+3 -3
+3 -3
scripts/lxdialog/menubox.c
··· 70 70 int j; 71 71 char *menu_item = malloc(menu_width + 1); 72 72 73 - strncpy(menu_item, item, menu_width); 73 + strncpy(menu_item, item, menu_width - ITEM_IDENT); 74 74 menu_item[menu_width] = 0; 75 75 j = first_alpha(menu_item, "YyNnMmHh"); 76 76 ··· 184 184 const char *const *items) 185 185 { 186 186 int i, j, x, y, box_x, box_y; 187 - int key = 0, button = 0, scroll = 0, choice = 0, first_item = 188 - 0, max_choice; 187 + int key = 0, button = 0, scroll = 0, choice = 0; 188 + int first_item = 0, max_choice; 189 189 WINDOW *dialog, *menu; 190 190 FILE *f; 191 191