Commit 96e86d52 authored by Jeremy White's avatar Jeremy White Committed by Frediano Ziglio
Browse files

Initialize the output variables in the called function.

It was previously inconsistent, with partial initialization
outside and partial initialization inside.

Noted by Frediano Ziglio.
Acked-by: Frediano Ziglio's avatarFrediano Ziglio <>
parent f5338791
......@@ -610,6 +610,8 @@ int display_scan_whole_screen(display_t *d, int num_vertical_tiles, int num_hori
shm_image_t *fullscreen_new;
memset(tiles, 0, sizeof(**tiles) * num_vertical_tiles * num_horizontal_tiles);
memset(tiles_changed_in_row, 0, sizeof(*tiles_changed_in_row) * num_vertical_tiles);
fullscreen_new = create_shm_image(d, 0, 0);
if (!fullscreen_new)
return 0;
......@@ -361,8 +361,6 @@ static void scan_full_screen(scanner_t *scanner)
int tiles_changed_in_row[num_vertical_tiles];
int tiles_changed[num_vertical_tiles][NUM_HORIZONTAL_TILES];
memset(tiles_changed_in_row, 0, sizeof(tiles_changed_in_row));
rc = display_scan_whole_screen(&scanner->session->display,
num_vertical_tiles, NUM_HORIZONTAL_TILES,
tiles_changed, tiles_changed_in_row);
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