Use struct initializers instead of memset()

This is a bit more type-safe.
This commit is contained in:
Simon Ser 2023-07-07 14:34:56 +02:00
parent 4966857f21
commit 7a9f8d8d6b
34 changed files with 134 additions and 113 deletions

View file

@ -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);