td_verror() needs errno style error
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 2f6aecf2bbf5c7710d99772934e32183a5c4fb89..4b0b5a7a11bdb002f72d552c89ee4ce8c4fd6b4e 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -426,12 +426,10 @@ static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u,
        unsigned int minbs, maxbs;
        unsigned long r, rand_max;
 
-       assert(ddir_rw(io_u->ddir));
+       assert(ddir_rw(ddir));
 
        if (td->o.bs_is_seq_rand)
                ddir = is_random ? DDIR_WRITE: DDIR_READ;
-       else
-               ddir = io_u->ddir;
 
        minbs = td->o.min_bs[ddir];
        maxbs = td->o.max_bs[ddir];
@@ -680,7 +678,7 @@ static void set_rw_ddir(struct thread_data *td, struct io_u *io_u)
 
 void put_file_log(struct thread_data *td, struct fio_file *f)
 {
-       int ret = put_file(td, f);
+       unsigned int ret = put_file(td, f);
 
        if (ret)
                td_verror(td, ret, "file close");