thebeanogamer / rpms / qemu-kvm

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