OSDN Git Service

qcow2: Don't shadow return value
authorMax Reitz <mreitz@redhat.com>
Tue, 24 Sep 2013 11:50:46 +0000 (13:50 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 25 Sep 2013 08:08:56 +0000 (10:08 +0200)
commit7454d600457f75f4fda6bf7be027fd3bcf7d5220
tree94a2325b760f3dd48d9dd1e62db3d6a839475c13
parentff42308f30e05155efc78a1f00f53943ca51e4f9
qcow2: Don't shadow return value

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 <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-refcount.c