aboutsummaryrefslogtreecommitdiff
path: root/block/iscsi.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-12-23 16:30:41 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-01-03 09:22:13 +0100
commitdebfb917a4f9c0784772c86f110f2bcd22e5a14f (patch)
tree7e384f303b55d3d300c79ba8326901a2eea348f0 /block/iscsi.c
parentd13c0404092eb46e548754a47a808da1bb8d4fd0 (diff)
block/iscsi: fix uninitialized variable
'ret' was never initialized in the success path. Signed-off-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r--block/iscsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index ed375fc30e..12ddbfb095 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. "