diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-12-23 16:30:41 +0100 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2015-02-24 15:02:12 -0600 |
commit | 7d389a2138a3b31895cf40300d052eda71ef0722 (patch) | |
tree | 5653f94286aa88e2b68adb09e283dbdbac67f970 /block | |
parent | 2a020d29dff124003728d517c1896ed6f14a53d6 (diff) | |
download | qemu-7d389a2138a3b31895cf40300d052eda71ef0722.tar.gz |
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>
(cherry picked from commit debfb917a4f9c0784772c86f110f2bcd22e5a14f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/iscsi.c | 2 |
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. " |