for_each_file() fix
authorJens Axboe <jens.axboe@oracle.com>
Thu, 6 Mar 2008 09:30:30 +0000 (10:30 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 6 Mar 2008 09:30:30 +0000 (10:30 +0100)
commit58f9f0495ae8de5bc221e4afaa543132bc149bc4
tree2a383ff61f4247fb3bb1557f122f6d940b662e47
parent9efef3c4bd6a032a2a9f7a9aab1c29436525d781
for_each_file() fix

We will deref ->files one beyond the allocated length due to the way
that C for(;;) loops work. So rework it a bit to make it more safe
and not look beyond the array. We didn't touch the memory before, but
it was still somewhat ugly.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.h