]> git.proxmox.com Git - mirror_qemu.git/commit - block/blkdebug.c
block/blkdebug: remove new_state field and instead use a local variable
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Mon, 14 Jun 2021 08:29:30 +0000 (10:29 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 19 Jul 2021 15:38:38 +0000 (17:38 +0200)
commit4153b553bd81e5b270b816699184df5d74c46805
tree92e46608302ce0e0fe6c45bf58ed6375c178a9c0
parent2196c341f7d0df161d412d3d7ea81545ab60ea2b
block/blkdebug: remove new_state field and instead use a local variable

There seems to be no benefit in using a field. Replace it with a local
variable, and move the state update before the yields.

The state update has do be done before the yields because now using
a local variable does not allow the new updated state to be visible
by the other yields.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20210614082931.24925-6-eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/blkdebug.c