mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-15 06:59:43 -05: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
|
|
@ -377,6 +377,8 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
|
|||
if (impl->set_cursor || impl->move_cursor) {
|
||||
assert(impl->set_cursor && impl->move_cursor);
|
||||
}
|
||||
|
||||
memset(output, 0, sizeof(*output));
|
||||
output->backend = backend;
|
||||
output->impl = impl;
|
||||
output->display = display;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue