aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2014-11-11 17:23:40 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2014-11-11 17:34:53 +0300
commitd208a85f1568ab8aec238cb91367581c61350008 (patch)
tree7f0b9048148cc16219aa04c75ba6fd7b1c0b2dbc
parent7f151e6f718f2edaf8661c4dedf6fcdb30b10e1b (diff)
downloadqemu-d208a85f1568ab8aec238cb91367581c61350008.zip
qemu-d208a85f1568ab8aec238cb91367581c61350008.tar.gz
qemu-d208a85f1568ab8aec238cb91367581c61350008.tar.bz2
xen-hvm: Remove redundant variable 'xstate'
In xen_hvm_change_state_handler(), we can pass 'opaque' with type cast to xen_main_loop_prepare() directly, there's no need to use additional variable for it. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--xen-hvm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xen-hvm.c b/xen-hvm.c
index 21f1cbb..7548794 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -993,9 +993,8 @@ static void xen_main_loop_prepare(XenIOState *state)
static void xen_hvm_change_state_handler(void *opaque, int running,
RunState rstate)
{
- XenIOState *xstate = opaque;
if (running) {
- xen_main_loop_prepare(xstate);
+ xen_main_loop_prepare((XenIOState *)opaque);
}
}