Skip to content

Commit

Permalink
block: fix shadowed variable in bdrv_co_pdiscard
Browse files Browse the repository at this point in the history
We've had a shadowed 'ret' variable, which risks returning the wrong
value, introduced in commit b9c6494.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20170710150559.30163-1-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
Denis V. Lunev authored and stefanhaRH committed Jul 17, 2017
1 parent 55d41b1 commit 593ed6f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion block/io.c
Expand Up @@ -2335,7 +2335,6 @@ int coroutine_fn bdrv_co_pdiscard(BlockDriverState *bs, int64_t offset,
assert(max_pdiscard >= bs->bl.request_alignment);

while (bytes > 0) {
int ret;
int num = bytes;

if (head) {
Expand Down

0 comments on commit 593ed6f

Please sign in to comment.