Commit 593ed6f0 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by Stefan Hajnoczi
Browse files

block: fix shadowed variable in bdrv_co_pdiscard



We've had a shadowed 'ret' variable, which risks returning the wrong
value, introduced in commit b9c64947.

Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Reviewed-by: default avatarFam Zheng <famz@redhat.com>
Reviewed-by: default avatarEric 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: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent 55d41b16
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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) {