From: Kevin Wolf Date: Tue, 14 Jun 2016 09:29:32 +0000 (+0200) Subject: qemu-img bench: Fix uninitialised writethrough mode X-Git-Tag: v2.7.0-rc0~117^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=604e86136266d104210a74be4c82643300c74e69;p=thirdparty%2Fqemu.git 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 Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi --- diff --git a/qemu-img.c b/qemu-img.c index 251386b49dc..14e2661a5c4 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -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;