# HG changeset patch # User Eli Zaretskii # Date 1192277407 0 # Node ID a2daf11c89b51e3bcbf49bed5ce38f3b64d7bae9 # Parent 205db480c6db1f793e7b9d62462bcab42e2476b3 (grow_menu_items): Use larger_vector. diff -r 205db480c6db -r a2daf11c89b5 src/xmenu.c --- a/src/xmenu.c Sat Oct 13 12:09:48 2007 +0000 +++ b/src/xmenu.c Sat Oct 13 12:10:07 2007 +0000 @@ -354,15 +354,8 @@ static void grow_menu_items () { - Lisp_Object old; - int old_size = menu_items_allocated; - old = menu_items; - menu_items_allocated *= 2; - - menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); - bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents, - old_size * sizeof (Lisp_Object)); + menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); } /* Begin a submenu. */