Fixup commit dd7b3ea8d65
- Some weird style confusion in filesetup.c
- Style cleanup and move of setvbuf()
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/filesetup.c b/filesetup.c
index c07d45e..e1dedcd 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -885,8 +885,8 @@
if (f->io_size == -1ULL)
total_size = -1ULL;
else {
- if (o->size_percent)
- f->io_size = (f->io_size * o->size_percent) / 100;
+ if (o->size_percent)
+ f->io_size = (f->io_size * o->size_percent) / 100;
total_size += f->io_size;
}
diff --git a/fio.c b/fio.c
index 9ac673f..bafbd48 100644
--- a/fio.c
+++ b/fio.c
@@ -31,7 +31,6 @@
int main(int argc, char *argv[], char *envp[])
{
int ret = 1;
- setvbuf (stdout, NULL, _IOLBF, 0); /* line buffer stdout to avoid output lines from multiple threads getting mixed */
if (initialize_fio(envp))
return 1;
@@ -43,6 +42,12 @@
if (parse_options(argc, argv))
goto done;
+ /*
+ * line buffer stdout to avoid output lines from multiple
+ * threads getting mixed
+ */
+ setvbuf(stdout, NULL, _IOLBF, 0);
+
fio_time_init();
if (nr_clients) {