t/io_uring: fix bad if
authorJens Axboe <axboe@kernel.dk>
Tue, 29 Jan 2019 19:04:22 +0000 (12:04 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 29 Jan 2019 19:04:22 +0000 (12:04 -0700)
We need braces for that check, or it's always going to be true.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/io_uring.c

index 9ded159..3bcb19b 100644 (file)
@@ -315,7 +315,7 @@ submit:
 
                        if (to_wait)
                                flags = IORING_ENTER_GETEVENTS;
-                       if (*ring->flags & IORING_SQ_NEED_WAKEUP)
+                       if ((*ring->flags & IORING_SQ_NEED_WAKEUP))
                                flags |= IORING_ENTER_SQ_WAKEUP;
                        ret = io_uring_enter(s, to_submit, to_wait, flags);
                        s->calls++;