diff options
author | Markus Armbruster <armbru@redhat.com> | 2023-09-21 14:13:11 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-09-29 08:13:57 +0200 |
commit | fb2575f95411644abe7f0606594035b63a5132ad (patch) | |
tree | e9e0fe4dc77d0d3575436232a7ce4d8d35a20c82 /block/rbd.c | |
parent | d25b99c72b0178ce0e0c766b07011102dbbacf6a (diff) | |
download | qemu-fb2575f95411644abe7f0606594035b63a5132ad.zip qemu-fb2575f95411644abe7f0606594035b63a5132ad.tar.gz qemu-fb2575f95411644abe7f0606594035b63a5132ad.tar.bz2 |
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 <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230921121312.1301864-7-armbru@redhat.com>
Diffstat (limited to 'block/rbd.c')
-rw-r--r-- | block/rbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |