diff --git a/src/client/msgr_receive.cpp b/src/client/msgr_receive.cpp index d994443f..9a7b5c82 100644 --- a/src/client/msgr_receive.cpp +++ b/src/client/msgr_receive.cpp @@ -33,10 +33,12 @@ void osd_messenger_t::read_requests() auto iothread = iothreads.size() ? iothreads[peer_fd % iothreads.size()] : NULL; io_uring_sqe sqe_local; ring_data_t data_local; - sqe_local.user_data = (uint64_t)&data_local; io_uring_sqe* sqe = (iothread ? &sqe_local : ringloop->get_sqe()); if (iothread) + { + sqe_local = { .user_data = (uint64_t)&data_local }; data_local = {}; + } if (!sqe) { cl->read_msg.msg_iovlen = 0; diff --git a/src/client/msgr_send.cpp b/src/client/msgr_send.cpp index 302160c3..dc659ba5 100644 --- a/src/client/msgr_send.cpp +++ b/src/client/msgr_send.cpp @@ -194,10 +194,12 @@ bool osd_messenger_t::try_send(osd_client_t *cl) auto iothread = iothreads.size() ? iothreads[peer_fd % iothreads.size()] : NULL; io_uring_sqe sqe_local; ring_data_t data_local; - sqe_local.user_data = (uint64_t)&data_local; io_uring_sqe* sqe = (iothread ? &sqe_local : ringloop->get_sqe()); if (iothread) + { + sqe_local = { .user_data = (uint64_t)&data_local }; data_local = {}; + } if (!sqe) return false; cl->write_msg.msg_iov = cl->send_list.data();