summaryrefslogtreecommitdiff
path: root/test/io_uring-test.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-10 15:11:07 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-10 15:11:07 -0700
commita992ffa48292f1175ea2621de58fb4cde3bb62dd (patch)
tree36db000c24bba813380e8df4dedf66f86713f88d /test/io_uring-test.c
parentfa863f6b4ad73c6bea2cabbd50803af78895e1d5 (diff)
io_queue_init: pass in flags, not io_uring_params
We don't need any of the information in there in the caller, and this makes it harder to abuse as we don't require the caller to have memset() the struct first. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test/io_uring-test.c')
-rw-r--r--test/io_uring-test.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/io_uring-test.c b/test/io_uring-test.c
index a13e405..42a8745 100644
--- a/test/io_uring-test.c
+++ b/test/io_uring-test.c
@@ -15,7 +15,6 @@
int main(int argc, char *argv[])
{
- struct io_uring_params p;
struct io_uring ring;
int i, fd, ret, pending, done;
struct io_uring_sqe *sqe;
@@ -29,9 +28,7 @@ int main(int argc, char *argv[])
return 1;
}
- memset(&p, 0, sizeof(p));
-
- ret = io_uring_queue_init(QD, &p, &ring);
+ ret = io_uring_queue_init(QD, &ring, 0);
if (ret < 0) {
fprintf(stderr, "queue_init: %s\n", strerror(-ret));
return 1;