qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 41/43] block/iscsi: fix uninitialized variable


From: Michael Roth
Subject: [Qemu-devel] [PATCH 41/43] block/iscsi: fix uninitialized variable
Date: Tue, 24 Feb 2015 15:48:16 -0600

From: Peter Wu <address@hidden>

'ret' was never initialized in the success path.

Signed-off-by: Peter Wu <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit debfb917a4f9c0784772c86f110f2bcd22e5a14f)
Signed-off-by: Michael Roth <address@hidden>
---
 block/iscsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/iscsi.c b/block/iscsi.c
index ed375fc..12ddbfb 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1286,7 +1286,7 @@ static int iscsi_open(BlockDriverState *bs, QDict 
*options, int flags,
     QemuOpts *opts;
     Error *local_err = NULL;
     const char *filename;
-    int i, ret;
+    int i, ret = 0;
 
     if ((BDRV_SECTOR_SIZE % 512) != 0) {
         error_setg(errp, "iSCSI: Invalid BDRV_SECTOR_SIZE. "
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]