mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 04:36:07 +00:00
ipc: Use XRT_STRUCT_INIT
This commit is contained in:
parent
4a8448fcc3
commit
09975b0d24
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue