qemu-img bench: Fix uninitialised writethrough mode

If no -t option is specified, bool writethrough stayed uninitialised.
Initialise it as false, which makes cache=writeback the default cache
mode.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
stable-2.7
Kevin Wolf 2016-06-14 11:29:32 +02:00
parent 9e19036e5a
commit 604e861362
1 changed files with 1 additions and 1 deletions

View File

@ -3570,7 +3570,7 @@ static int img_bench(int argc, char **argv)
BlockBackend *blk = NULL;
BenchData data = {};
int flags = 0;
bool writethrough;
bool writethrough = false;
struct timeval t1, t2;
int i;