[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/29] qcow2: Remove dead check on !ret
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 12/29] qcow2: Remove dead check on !ret |
Date: |
Fri, 29 Jun 2018 16:09:42 +0200 |
From: Fam Zheng <address@hidden>
In the beginning of the function, we initialize the local variable to 0,
and in the body of the function, we check the assigned values and exit
the loop immediately. So here it can never be non-zero.
Reported-by: Kevin Wolf <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 4a0d92860d..2d190aa00b 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1772,7 +1772,7 @@ static coroutine_fn int
qcow2_handle_l2meta(BlockDriverState *bs,
while (l2meta != NULL) {
QCowL2Meta *next;
- if (!ret && link_l2) {
+ if (link_l2) {
ret = qcow2_alloc_cluster_link_l2(bs, l2meta);
if (ret) {
goto out;
--
2.13.6
- [Qemu-devel] [PULL 00/29] Block layer patches, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 03/29] qapi/job: The next release will be 3.0, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 04/29] usb-storage: Add rerror/werror properties, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 02/29] block/crypto: Pacify Coverity after commit f853465aacb, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 05/29] hw/block/nvme: add optional parameter num_queues for nvme device, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 01/29] block-qdict: Pacify Coverity after commit f1b34a248e9, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 10/29] block: Use tracked request for truncate, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 12/29] qcow2: Remove dead check on !ret,
Kevin Wolf <=
- [Qemu-devel] [PULL 06/29] qcow2: Fix qcow2_truncate() error return value, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 09/29] block: Move bdrv_truncate() implementation to io.c, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 11/29] file-posix: Make .bdrv_co_truncate asynchronous, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 07/29] block: Convert .bdrv_truncate callback to coroutine_fn, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 14/29] block/crypto: Simplify block_crypto_{open, create}_opts_init(), Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 08/29] qcow2: Remove coroutine trampoline for preallocate_co(), Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 13/29] block: Move request tracking to children in copy offloading, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 16/29] qcow2: Free allocated clusters on write error, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 15/29] qemu-iotests: Update 026.out.nocache reference output, Kevin Wolf, 2018/06/29
- [Qemu-devel] [PULL 21/29] file-posix: Fix EINTR handling, Kevin Wolf, 2018/06/29