diff options
Diffstat (limited to 'src/xmenu.c')
-rw-r--r-- | src/xmenu.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index b7dd547737d..5a6390449c4 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -980,8 +980,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) ptrdiff_t specpdl_count = SPECPDL_INDEX (); int previous_menu_items_used = f->menu_bar_items_used; Lisp_Object *previous_items - = (Lisp_Object *) alloca (previous_menu_items_used - * sizeof (Lisp_Object)); + = alloca (previous_menu_items_used * sizeof *previous_items); int subitems; /* If we are making a new widget, its contents are empty, @@ -1028,10 +1027,11 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) menu_items = f->menu_bar_vector; menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; subitems = ASIZE (items) / 4; - submenu_start = (int *) alloca ((subitems + 1) * sizeof (int)); - submenu_end = (int *) alloca (subitems * sizeof (int)); - submenu_n_panes = (int *) alloca (subitems * sizeof (int)); - submenu_top_level_items = (int *) alloca (subitems * sizeof (int)); + submenu_start = alloca ((subitems + 1) * sizeof *submenu_start); + submenu_end = alloca (subitems * sizeof *submenu_end); + submenu_n_panes = alloca (subitems * sizeof *submenu_n_panes); + submenu_top_level_items = alloca (subitems + * sizeof *submenu_top_level_items); init_menu_items (); for (i = 0; i < subitems; i++) { @@ -1639,9 +1639,9 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, int i; widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0; widget_value **submenu_stack - = (widget_value **) alloca (menu_items_used * sizeof (widget_value *)); + = alloca (menu_items_used * sizeof *submenu_stack); Lisp_Object *subprefix_stack - = (Lisp_Object *) alloca (menu_items_used * sizeof (Lisp_Object)); + = alloca (menu_items_used * sizeof *subprefix_stack); int submenu_depth = 0; int first_pane; @@ -2416,7 +2416,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, { /* if alloca is fast, use that to make the space, to reduce gc needs. */ - item_data = (char *) alloca (maxwidth + SBYTES (descrip) + 1); + item_data = alloca (maxwidth + SBYTES (descrip) + 1); memcpy (item_data, SSDATA (item_name), SBYTES (item_name)); for (j = SCHARS (item_name); j < maxwidth; j++) item_data[j] = ' '; |