[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/30] qcow2: Don't shadow return value
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 04/30] qcow2: Don't shadow return value |
Date: |
Fri, 27 Sep 2013 17:39:04 +0200 |
From: Max Reitz <address@hidden>
When trying to update the refcounts for a snapshot, the return value of
update_refcount on a compressed cluster was pretty much ignored,
cancelling the update on error but returning 0. This is caused by an
inner "ret" variable shadowing the outer one (the latter is used in the
return statement).
Signed-off-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2-refcount.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 4264148..d2b7064 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -874,7 +874,6 @@ int qcow2_update_snapshot_refcount(BlockDriverState *bs,
nb_csectors = ((offset >> s->csize_shift) &
s->csize_mask) + 1;
if (addend != 0) {
- int ret;
ret = update_refcount(bs,
(offset & s->cluster_offset_mask) & ~511,
nb_csectors * 512, addend,
--
1.8.1.4
- [Qemu-devel] [PULL 00/30] Block patches, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 01/30] block: fix backing file overriding, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 02/30] qemu-iotests: add test for backing file overriding, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 05/30] block/get_block_status: set *pnum = 0 on error, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 06/30] block/get_block_status: avoid segfault if there is no backing_hd, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 04/30] qcow2: Don't shadow return value,
Kevin Wolf <=
- [Qemu-devel] [PULL 03/30] qemu-iotests: Do not execute 052 with -nocache, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 10/30] block: introduce BlockDriver.bdrv_needs_filename to enable some drivers., Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 11/30] block: Fix compiler warning (-Werror=uninitialized), Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 07/30] vmdk: fix cluster size check for flat extents, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 09/30] qemu-iotests: add monolithicFlat creation test to 059, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 08/30] qemu-iotests: fix test case 059, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 17/30] block: qed - use QEMU_PACKED for on-disk structures, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 12/30] qdict: Extract qdict_extract_subqdict, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 15/30] block: vpc - use QEMU_PACKED for on-disk structures, Kevin Wolf, 2013/09/27
- [Qemu-devel] [PULL 20/30] qemu-iotests: fix qmp.py search path, Kevin Wolf, 2013/09/27