X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=io_u_queue.c;h=80a32ba3afd20d4a8b3669935ca10d035720a554;hb=1d824f370d9e7fb9fc5aa23bc847c31c8467367a;hp=5734e9c399cc9fc48238bf1c8c943f956b7dbf72;hpb=2ae0b204743d6b4048c6fffd46c6280a70f2ecd1;p=fio.git 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;