Commit a06104af authored by Sam Ravnborg's avatar Sam Ravnborg

kconfig: lxdialog is now sparse clean

Replacing a gcc idiom with malloc and deleting an unused global
variable made lxdialog sparse clean.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent dec69da8
...@@ -67,7 +67,7 @@ static void print_item(WINDOW * win, const char *item, int choice, ...@@ -67,7 +67,7 @@ static void print_item(WINDOW * win, const char *item, int choice,
int selected, int hotkey) int selected, int hotkey)
{ {
int j; int j;
char menu_item[menu_width + 1]; char *menu_item = malloc(menu_width + 1);
strncpy(menu_item, item, menu_width); strncpy(menu_item, item, menu_width);
menu_item[menu_width] = 0; menu_item[menu_width] = 0;
...@@ -95,6 +95,7 @@ static void print_item(WINDOW * win, const char *item, int choice, ...@@ -95,6 +95,7 @@ static void print_item(WINDOW * win, const char *item, int choice,
wmove(win, choice, item_x + 1); wmove(win, choice, item_x + 1);
wrefresh(win); wrefresh(win);
} }
free(menu_item);
} }
/* /*
......
...@@ -26,8 +26,6 @@ bool use_colors = 1; ...@@ -26,8 +26,6 @@ bool use_colors = 1;
const char *backtitle = NULL; const char *backtitle = NULL;
const char *dialog_result;
/* /*
* Attribute values, default is for mono display * Attribute values, default is for mono display
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment