From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDXya-0007c8-Hh for qemu-devel@nongnu.org; Thu, 16 Jun 2016 10:09:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDXyY-0000MU-Bs for qemu-devel@nongnu.org; Thu, 16 Jun 2016 10:08:55 -0400 From: Kevin Wolf Date: Thu, 16 Jun 2016 16:07:58 +0200 Message-Id: <1466086108-24868-10-git-send-email-kwolf@redhat.com> In-Reply-To: <1466086108-24868-1-git-send-email-kwolf@redhat.com> References: <1466086108-24868-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 09/39] qemu-img bench: Fix uninitialised writethrough mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org 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 --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 251386b..14e2661 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; -- 1.8.3.1