diff options
author | Simon Ser <contact@emersion.fr> | 2023-07-07 14:34:56 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-07-07 17:31:11 +0200 |
commit | 7a9f8d8d6bf72fcea210552b7bec9b99f342f857 (patch) | |
tree | c84c622b9ea25646c081f81b534ec7c70b84ac84 /render/swapchain.c | |
parent | 4966857f211cb6f48852928076a59f16aadb742b (diff) |
Use struct initializers instead of memset()
This is a bit more type-safe.
Diffstat (limited to 'render/swapchain.c')
-rw-r--r-- | render/swapchain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/render/swapchain.c b/render/swapchain.c index f72e722c..a2b6373b 100644 --- a/render/swapchain.c +++ b/render/swapchain.c @@ -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) { |