ipc: Use XRT_STRUCT_INIT

This commit is contained in:
Jakob Bornecrantz 2022-11-20 22:13:19 +00:00
parent 4a8448fcc3
commit 09975b0d24
2 changed files with 3 additions and 3 deletions

View file

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

View file

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