Fix potential divide-by-zero in calc_rate()
[fio.git] / backend.c
index d6d3a6704c11cff3aafd51f2d6052f6941b3527a..3eafff6e6bbbcca9bc8ef3594ff3f74e0e222013 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -894,7 +894,7 @@ static uint64_t do_io(struct thread_data *td)
                } else {
                        ret = td_io_queue(td, io_u);
 
-                       if (io_queue_event(td, io_u, &ret, ddir, &bytes_issued, 1, &comp_time))
+                       if (io_queue_event(td, io_u, &ret, ddir, &bytes_issued, 0, &comp_time))
                                break;
 
                        /*
@@ -1243,7 +1243,7 @@ static int keep_running(struct thread_data *td)
 static int exec_string(struct thread_options *o, const char *string, const char *mode)
 {
        size_t newlen = strlen(string) + strlen(o->name) + strlen(mode) + 9 + 1;
-       int ret; /* newlen = strlen(string) + strlen(o->name) + strlen(mode) + 9 + 1; */
+       int ret;
        char *str;
 
        str = malloc(newlen);