From fb2575f95411644abe7f0606594035b63a5132ad Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 21 Sep 2023 14:13:11 +0200 Subject: block: Clean up local variable shadowing Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi Acked-by: Anthony PERARD Acked-by: Ilya Dryomov Reviewed-by: Kevin Wolf Message-ID: <20230921121312.1301864-7-armbru@redhat.com> --- block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/rbd.c') diff --git a/block/rbd.c b/block/rbd.c index 9786714..472ca05 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -1290,7 +1290,7 @@ static int coroutine_fn qemu_rbd_start_co(BlockDriverState *bs, * operations that exceed the current size. */ if (offset + bytes > s->image_size) { - int r = qemu_rbd_resize(bs, offset + bytes); + r = qemu_rbd_resize(bs, offset + bytes); if (r < 0) { return r; } -- cgit v1.1