aboutsummaryrefslogtreecommitdiffstats
path: root/src/scroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/scroll.c b/src/scroll.c
index 3e296068e8f..b9ed8c04ba8 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -652,8 +652,7 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
652 652
653 /* A queue of deletions and insertions to be performed. */ 653 /* A queue of deletions and insertions to be performed. */
654 struct alt_queue { int count, pos, window; }; 654 struct alt_queue { int count, pos, window; };
655 struct alt_queue *queue_start = (struct alt_queue *) 655 struct alt_queue *queue_start = alloca (window_size * sizeof *queue_start);
656 alloca (window_size * sizeof *queue_start);
657 struct alt_queue *queue = queue_start; 656 struct alt_queue *queue = queue_start;
658 657
659 /* True if a terminal window has been set with set_terminal_window. */ 658 /* True if a terminal window has been set with set_terminal_window. */
@@ -797,9 +796,8 @@ scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top,
797 int unchanged_at_bottom, int *draw_cost, int *old_draw_cost, 796 int unchanged_at_bottom, int *draw_cost, int *old_draw_cost,
798 int *old_hash, int *new_hash, int free_at_end) 797 int *old_hash, int *new_hash, int free_at_end)
799{ 798{
800 struct matrix_elt *matrix; 799 struct matrix_elt *matrix
801 matrix = ((struct matrix_elt *) 800 = alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix);
802 alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix));
803 801
804 if (FRAME_SCROLL_REGION_OK (frame)) 802 if (FRAME_SCROLL_REGION_OK (frame))
805 { 803 {