summaryrefslogtreecommitdiff
path: root/io_u_queue.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2013-12-06 12:02:10 -0700
committerJens Axboe <axboe@kernel.dk>2013-12-06 12:02:10 -0700
commit572cfb3f4d2cbf22291b395f2bb41facdc17ce86 (patch)
treede61b4b93791b11cfeec2c3c7ac8587f3e31dede /io_u_queue.c
parente171fde52d9c2d0247365793d464a2a3c5e3af22 (diff)
downloadfio-572cfb3f4d2cbf22291b395f2bb41facdc17ce86.tar.gz
fio-572cfb3f4d2cbf22291b395f2bb41facdc17ce86.tar.bz2
Calloc() cleanup
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_u_queue.c')
-rw-r--r--io_u_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_u_queue.c b/io_u_queue.c
index 5734e9c3..80a32ba3 100644
--- a/io_u_queue.c
+++ b/io_u_queue.c
@@ -3,7 +3,7 @@
int io_u_qinit(struct io_u_queue *q, unsigned int nr)
{
- q->io_us = calloc(sizeof(struct io_u *), nr);
+ q->io_us = calloc(nr, sizeof(struct io_u *));
if (!q->io_us)
return 1;
@@ -29,7 +29,7 @@ int io_u_rinit(struct io_u_ring *ring, unsigned int nr)
ring->max++;
}
- ring->ring = calloc(sizeof(struct io_u *), ring->max);
+ ring->ring = calloc(ring->max, sizeof(struct io_u *));
if (!ring->ring)
return 1;