X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u_queue.h;h=5b6cad0ef173926f1ff0e259bac560f2a69d1d83;hp=4f6e8e6a703b573e8f5c0d3e24fa397e090008e2;hb=ab50817f68faf742e7725922b9225fc067275750;hpb=2ae0b204743d6b4048c6fffd46c6280a70f2ecd1 diff --git a/io_u_queue.h b/io_u_queue.h index 4f6e8e6a..5b6cad0e 100644 --- a/io_u_queue.h +++ b/io_u_queue.h @@ -29,7 +29,7 @@ static inline int io_u_qempty(struct io_u_queue *q) } #define io_u_qiter(q, io_u, i) \ - for (i = 0, io_u = (q)->io_us[0]; i < (q)->nr; i++, io_u = (q)->io_us[i]) + for (i = 0; i < (q)->nr && (io_u = (q)->io_us[i]); i++) int io_u_qinit(struct io_u_queue *q, unsigned int nr); void io_u_qexit(struct io_u_queue *q);