mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-12-26 21:59:18 +01:00
Zero-initialize alloc_step and alloc_result
Avoids having to deal with uninitialized memory issues.
This commit is contained in:
parent
cc3eec82fd
commit
8360818a7e
1 changed files with 3 additions and 3 deletions
6
alloc.c
6
alloc.c
|
@ -361,7 +361,7 @@ int output_choose_layers(struct liftoff_output *output,
|
|||
struct liftoff_layer *layer;
|
||||
int cursor, ret;
|
||||
size_t remaining_planes;
|
||||
struct alloc_step next_step;
|
||||
struct alloc_step next_step = {0};
|
||||
|
||||
device = output->device;
|
||||
|
||||
|
@ -644,8 +644,8 @@ int liftoff_output_apply(struct liftoff_output *output, drmModeAtomicReq *req,
|
|||
struct liftoff_device *device;
|
||||
struct liftoff_plane *plane;
|
||||
struct liftoff_layer *layer;
|
||||
struct alloc_result result;
|
||||
struct alloc_step step;
|
||||
struct alloc_result result = {0};
|
||||
struct alloc_step step = {0};
|
||||
size_t i, candidate_planes;
|
||||
int ret;
|
||||
|
||||
|
|
Loading…
Reference in a new issue