aboutsummaryrefslogtreecommitdiff
path: root/accel
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 /accel
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 'accel')
-rw-r--r--accel/tcg/translate-all.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index f409d42d54..732c919629 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -644,11 +644,8 @@ static inline void *alloc_code_gen_buffer(void)
static inline void *alloc_code_gen_buffer(void)
{
size_t size = tcg_ctx->code_gen_buffer_size;
- void *buf;
-
- buf = VirtualAlloc(NULL, size, MEM_RESERVE | MEM_COMMIT,
+ return VirtualAlloc(NULL, size, MEM_RESERVE | MEM_COMMIT,
PAGE_EXECUTE_READWRITE);
- return buf;
}
#else
static inline void *alloc_code_gen_buffer(void)