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

@ -42,7 +42,7 @@ static void slot_reset(struct wlr_swapchain_slot *slot) {
wl_list_remove(&slot->release.link);
}
wlr_buffer_drop(slot->buffer);
memset(slot, 0, sizeof(*slot));
*slot = (struct wlr_swapchain_slot){0};
}
void wlr_swapchain_destroy(struct wlr_swapchain *swapchain) {