aboutsummaryrefslogtreecommitdiff
path: root/target/i386
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2018-03-23 15:32:02 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2018-05-20 08:48:13 +0300
commit4a4ff4c58fd750cde01c8b15d30d038cefc90a42 (patch)
tree663380d3786b808f7829236f2d085b437d4edb71 /target/i386
parentf23c81073a4f9aa41a3687161f6ca3d66501a280 (diff)
Remove unnecessary variables for function return value
Re-run Coccinelle script scripts/coccinelle/return_directly.cocci Signed-off-by: Laurent Vivier <lvivier@redhat.com> ppc part Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'target/i386')
-rw-r--r--target/i386/hax-darwin.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/target/i386/hax-darwin.c b/target/i386/hax-darwin.c
index acdde476a0..a5426a6dac 100644
--- a/target/i386/hax-darwin.c
+++ b/target/i386/hax-darwin.c
@@ -257,10 +257,7 @@ int hax_host_setup_vcpu_channel(struct hax_vcpu_state *vcpu)
int hax_vcpu_run(struct hax_vcpu_state *vcpu)
{
- int ret;
-
- ret = ioctl(vcpu->fd, HAX_VCPU_IOCTL_RUN, NULL);
- return ret;
+ return ioctl(vcpu->fd, HAX_VCPU_IOCTL_RUN, NULL);
}
int hax_sync_fpu(CPUArchState *env, struct fx_layout *fl, int set)
@@ -315,13 +312,12 @@ int hax_sync_vcpu_state(CPUArchState *env, struct vcpu_state_t *state, int set)
int hax_inject_interrupt(CPUArchState *env, int vector)
{
- int ret, fd;
+ int fd;
fd = hax_vcpu_get_fd(env);
if (fd <= 0) {
return -1;
}
- ret = ioctl(fd, HAX_VCPU_IOCTL_INTERRUPT, &vector);
- return ret;
+ return ioctl(fd, HAX_VCPU_IOCTL_INTERRUPT, &vector);
}