summaryrefslogtreecommitdiff
path: root/test/poll-cancel.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-04-07 18:36:43 -0600
committerJens Axboe <axboe@kernel.dk>2019-04-07 18:36:43 -0600
commitdb11f116c72a8ff3e306a8d5d1882d90c412c36d (patch)
treed4e2e6679a2030bd55bdf6a2b728146790911a1b /test/poll-cancel.c
parent1245d8320aa564bfcc63e8d64781fb391b421331 (diff)
downloadliburing-db11f116c72a8ff3e306a8d5d1882d90c412c36d.tar.gz
liburing-db11f116c72a8ff3e306a8d5d1882d90c412c36d.tar.bz2
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>
Diffstat (limited to 'test/poll-cancel.c')
-rw-r--r--test/poll-cancel.c4
1 files changed, 2 insertions, 2 deletions
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);