Use io_uring_cqe_get_data() internally

Replace all cqe->user_data casts with io_uring_cqe_get_data().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Jens Axboe
2019-04-07 18:36:43 -06:00
parent 1245d8320a
commit db11f116c7
3 changed files with 4 additions and 4 deletions

View File

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