X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u_queue.c;h=8cf4c8c3d702234a1cc0b0ba5ffee83ef3a4687a;hp=9994c7879a066a6b277b1863bd6e7f902ba01795;hb=bd6afe89a9874aeb788a228f7e63995b191b2eaa;hpb=6fb1bda0d0b61e2433f9ef34b4b979b2642d8706 diff --git a/io_u_queue.c b/io_u_queue.c index 9994c787..8cf4c8c3 100644 --- a/io_u_queue.c +++ b/io_u_queue.c @@ -1,15 +1,15 @@ #include #include "io_u_queue.h" -int io_u_qinit(struct io_u_queue *q, unsigned int nr) +bool io_u_qinit(struct io_u_queue *q, unsigned int nr) { q->io_us = calloc(nr, sizeof(struct io_u *)); if (!q->io_us) - return 1; + return false; q->nr = 0; q->max = nr; - return 0; + return true; } void io_u_qexit(struct io_u_queue *q) @@ -17,7 +17,7 @@ void io_u_qexit(struct io_u_queue *q) free(q->io_us); } -int io_u_rinit(struct io_u_ring *ring, unsigned int nr) +bool io_u_rinit(struct io_u_ring *ring, unsigned int nr) { ring->max = nr + 1; if (ring->max & (ring->max - 1)) { @@ -32,10 +32,10 @@ int io_u_rinit(struct io_u_ring *ring, unsigned int nr) ring->ring = calloc(ring->max, sizeof(struct io_u *)); if (!ring->ring) - return 1; + return false; ring->head = ring->tail = 0; - return 0; + return true; } void io_u_rexit(struct io_u_ring *ring)