From 09975b0d24c8f7eefbecae0d6f4e370caaa88b00 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sun, 20 Nov 2022 22:13:19 +0000 Subject: [PATCH] ipc: Use XRT_STRUCT_INIT --- src/xrt/ipc/server/ipc_server_handler.c | 2 +- src/xrt/ipc/server/ipc_server_per_client_thread.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xrt/ipc/server/ipc_server_handler.c b/src/xrt/ipc/server/ipc_server_handler.c index 20fd71de9..d538ad09f 100644 --- a/src/xrt/ipc/server/ipc_server_handler.c +++ b/src/xrt/ipc/server/ipc_server_handler.c @@ -828,7 +828,7 @@ ipc_handle_swapchain_import(volatile struct ipc_client_state *ics, return xret; } - struct xrt_image_native xins[XRT_MAX_SWAPCHAIN_IMAGES] = {0}; + struct xrt_image_native xins[XRT_MAX_SWAPCHAIN_IMAGES] = XRT_STRUCT_INIT; for (uint32_t i = 0; i < handle_count; i++) { xins[i].handle = handles[i]; xins[i].size = args->sizes[i]; diff --git a/src/xrt/ipc/server/ipc_server_per_client_thread.c b/src/xrt/ipc/server/ipc_server_per_client_thread.c index de2c1c974..d4e4955a7 100644 --- a/src/xrt/ipc/server/ipc_server_per_client_thread.c +++ b/src/xrt/ipc/server/ipc_server_per_client_thread.c @@ -45,7 +45,7 @@ setup_epoll(volatile struct ipc_client_state *ics) int epoll_fd = ret; - struct epoll_event ev = {0}; + struct epoll_event ev = XRT_STRUCT_INIT; ev.events = EPOLLIN; ev.data.fd = listen_socket; @@ -82,7 +82,7 @@ client_loop(volatile struct ipc_client_state *ics) while (ics->server->running) { const int half_a_second_ms = 500; - struct epoll_event event = {0}; + struct epoll_event event = XRT_STRUCT_INIT; // We use epoll here to be able to timeout. int ret = epoll_wait(epoll_fd, &event, 1, half_a_second_ms);