From: Denis V. Lunev Date: Mon, 10 Jul 2017 15:05:59 +0000 (+0300) Subject: block: fix shadowed variable in bdrv_co_pdiscard X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=593ed6f0a3c827a13a274e47f6fa980344234f9c;p=qemu.git 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: Denis V. Lunev Reviewed-by: Fam Zheng Reviewed-by: Eric Blake Message-id: 20170710150559.30163-1-den@openvz.org CC: Stefan Hajnoczi CC: Kevin Wolf CC: Eric Blake Signed-off-by: Stefan Hajnoczi --- diff --git a/block/io.c b/block/io.c index b413727524..a73153ddfe 100644 --- a/block/io.c +++ b/block/io.c @@ -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) {