|
|
ae23c9 |
From da8f22170113e69fd87bf3acd882ab4e1db005a6 Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Date: Wed, 18 Jul 2018 22:54:48 +0200
|
|
|
ae23c9 |
Subject: [PATCH 230/268] qcow2: Remove dead check on !ret
|
|
|
ae23c9 |
MIME-Version: 1.0
|
|
|
ae23c9 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ae23c9 |
Content-Transfer-Encoding: 8bit
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Message-id: <20180718225511.14878-13-jsnow@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 81409
|
|
|
ae23c9 |
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 12/35] qcow2: Remove dead check on !ret
|
|
|
ae23c9 |
Bugzilla: 1207657
|
|
|
ae23c9 |
RH-Acked-by: Eric Blake <eblake@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
From: Fam Zheng <famz@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
In the beginning of the function, we initialize the local variable to 0,
|
|
|
ae23c9 |
and in the body of the function, we check the assigned values and exit
|
|
|
ae23c9 |
the loop immediately. So here it can never be non-zero.
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Reported-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
ae23c9 |
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
|
|
ae23c9 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ae23c9 |
(cherry picked from commit 354d930dc6e90e97599459b79c071ff1b93e433b)
|
|
|
ae23c9 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
block/qcow2.c | 2 +-
|
|
|
ae23c9 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/block/qcow2.c b/block/qcow2.c
|
|
|
ae23c9 |
index c5341a4..e171a99 100644
|
|
|
ae23c9 |
--- a/block/qcow2.c
|
|
|
ae23c9 |
+++ b/block/qcow2.c
|
|
|
ae23c9 |
@@ -1772,7 +1772,7 @@ static coroutine_fn int qcow2_handle_l2meta(BlockDriverState *bs,
|
|
|
ae23c9 |
while (l2meta != NULL) {
|
|
|
ae23c9 |
QCowL2Meta *next;
|
|
|
ae23c9 |
|
|
|
ae23c9 |
- if (!ret && link_l2) {
|
|
|
ae23c9 |
+ if (link_l2) {
|
|
|
ae23c9 |
ret = qcow2_alloc_cluster_link_l2(bs, l2meta);
|
|
|
ae23c9 |
if (ret) {
|
|
|
ae23c9 |
goto out;
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|