block: fix shadowed variable in bdrv_co_pdiscard
PATCH v2 1/1 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 <[email protected]>
Reviewed-by Fam Zheng <[email protected]>
CC Stefan Hajnoczi <[email protected]>
CC Kevin Wolf <[email protected]>
CC Eric Blake <[email protected]>
--- block/io.c | 1 - 1 file changed, 1 deletion(-)
block/io.c +0 -1
@@ -2327,7 +2327,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) {
Signature · 1 line
2.11.0
Quoted 12 lines · Denis V. Lunev
We've had a shadowed 'ret' variable, which risks returning the wrong value, introduced in commit
b9c64947.Signed-off-by Denis V. Lunev <[email protected]>Reviewed-by Fam Zheng <[email protected]>CC Stefan Hajnoczi <[email protected]>CC Kevin Wolf <[email protected]>CC Eric Blake <[email protected]>--- block/io.c | 1 - 1 file changed, 1 deletion(-)
Reviewed-by Eric Blake <[email protected]>
Quoted 13 lines
block/io.c +0
-1@@ -2327,7 +2327,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) {
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Stefan Hajnoczi
AppliedQuoted 11 lines · Denis V. Lunev
We've had a shadowed 'ret' variable, which risks returning the wrong value, introduced in commit
b9c64947.Signed-off-by Denis V. Lunev <[email protected]>Reviewed-by Fam Zheng <[email protected]>CC Stefan Hajnoczi <[email protected]>CC Kevin Wolf <[email protected]>CC Eric Blake <[email protected]>--- block/io.c | 1 - 1 file changed, 1 deletion(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan