From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQNT8-0005Ky-8M for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:56:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQNT1-0000fv-1U for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:56:42 -0500 Received: from e38.co.us.ibm.com ([32.97.110.159]:54272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQNT0-0000fb-Qc for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:56:34 -0500 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Feb 2015 14:56:34 -0700 From: Michael Roth Date: Tue, 24 Feb 2015 15:48:16 -0600 Message-Id: <1424814498-6993-42-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1424814498-6993-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1424814498-6993-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 41/43] block/iscsi: fix uninitialized variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-stable@nongnu.org, Peter Wu From: Peter Wu 'ret' was never initialized in the success path. Signed-off-by: Peter Wu Signed-off-by: Paolo Bonzini (cherry picked from commit debfb917a4f9c0784772c86f110f2bcd22e5a14f) Signed-off-by: Michael Roth --- 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