mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Zero-initialize structs in init functions
Ensures there is no field left to its previous undefined value after calling an init function.
This commit is contained in:
parent
54653b5d95
commit
6c350799b2
20 changed files with 29 additions and 1 deletions
|
|
@ -39,6 +39,8 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
|
|||
assert(impl->render_quad_with_matrix);
|
||||
assert(impl->get_shm_texture_formats);
|
||||
assert(impl->get_render_buffer_caps);
|
||||
|
||||
memset(renderer, 0, sizeof(*renderer));
|
||||
renderer->impl = impl;
|
||||
|
||||
wl_signal_init(&renderer->events.destroy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue