projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change ARCH_X86_64_h to ARCH_X86_64_H
[fio.git]
/
io_u_queue.c
diff --git
a/io_u_queue.c
b/io_u_queue.c
index 5734e9c399cc9fc48238bf1c8c943f956b7dbf72..9994c7879a066a6b277b1863bd6e7f902ba01795 100644
(file)
--- a/
io_u_queue.c
+++ b/
io_u_queue.c
@@
-3,11
+3,12
@@
int io_u_qinit(struct io_u_queue *q, unsigned int nr)
{
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;
q->nr = 0;
if (!q->io_us)
return 1;
q->nr = 0;
+ q->max = nr;
return 0;
}
return 0;
}
@@
-29,7
+30,7
@@
int io_u_rinit(struct io_u_ring *ring, unsigned int nr)
ring->max++;
}
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;
if (!ring->ring)
return 1;