aboutsummaryrefslogtreecommitdiff
path: root/render/swapchain.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-07-07 14:34:56 +0200
committerSimon Ser <contact@emersion.fr>2023-07-07 17:31:11 +0200
commit7a9f8d8d6bf72fcea210552b7bec9b99f342f857 (patch)
treec84c622b9ea25646c081f81b534ec7c70b84ac84 /render/swapchain.c
parent4966857f211cb6f48852928076a59f16aadb742b (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.c2
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) {