mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Use struct initializers instead of memset()
This is a bit more type-safe.
This commit is contained in:
parent
4966857f21
commit
7a9f8d8d6b
34 changed files with 134 additions and 113 deletions
|
|
@ -40,8 +40,9 @@
|
|||
|
||||
void wlr_backend_init(struct wlr_backend *backend,
|
||||
const struct wlr_backend_impl *impl) {
|
||||
memset(backend, 0, sizeof(*backend));
|
||||
backend->impl = impl;
|
||||
*backend = (struct wlr_backend){
|
||||
.impl = impl,
|
||||
};
|
||||
wl_signal_init(&backend->events.destroy);
|
||||
wl_signal_init(&backend->events.new_input);
|
||||
wl_signal_init(&backend->events.new_output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue