diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/io_uring-cp.c | 2 | ||||
-rw-r--r-- | test/io_uring_enter.c | 2 | ||||
-rw-r--r-- | test/poll-cancel.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/test/io_uring-cp.c b/test/io_uring-cp.c index 3790736..4df8139 100644 --- a/test/io_uring-cp.c +++ b/test/io_uring-cp.c @@ -173,7 +173,7 @@ static int copy_file(struct io_uring *ring, off_t insize) if (!cqe) break; - data = (struct io_data *) (uintptr_t) cqe->user_data; + data = io_uring_cqe_get_data(cqe); if (cqe->res < 0) { if (cqe->res == -EAGAIN) { queue_prepped(ring, data); diff --git a/test/io_uring_enter.c b/test/io_uring_enter.c index a86eeaa..4dc46c4 100644 --- a/test/io_uring_enter.c +++ b/test/io_uring_enter.c @@ -154,7 +154,7 @@ reap_events(struct io_uring *ring, unsigned nr) } if (cqe->res != 4096) printf("cqe->res: %d, expected 4096\n", cqe->res); - iov = (struct iovec *)cqe->user_data; + iov = io_uring_cqe_get_data(cqe); free(iov->iov_base); free(iov); left--; diff --git a/test/poll-cancel.c b/test/poll-cancel.c index 722e7ff..4a3626d 100644 --- a/test/poll-cancel.c +++ b/test/poll-cancel.c @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) return 1; } - pd = (struct poll_data *) (uintptr_t) cqe->user_data; + pd = io_uring_cqe_get_data(cqe); if (cqe->res != 0) { printf("sqe (add=%d/remove=%d) failed with %ld\n", pd->is_poll, pd->is_cancel, (long) cqe->res); @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) return 1; } - pd = (struct poll_data *) (uintptr_t) cqe->user_data; + pd = io_uring_cqe_get_data(cqe); if (cqe->res != 0) { printf("sqe (add=%d/remove=%d) failed with %ld\n", pd->is_poll, pd->is_cancel, (long) cqe->res); |