diff options
author | Markus Armbruster | 2022-09-23 14:00:24 +0200 |
---|---|---|
committer | Laurent Vivier | 2022-10-22 23:15:40 +0200 |
commit | 0a553c12c71d5627abf223a926ab9688a5573f54 (patch) | |
tree | 95184e811f9e92c0b734e83e2af3a57a80d18536 /hw/char | |
parent | elf2dmp: free memory in failure (diff) | |
download | qemu-0a553c12c71d5627abf223a926ab9688a5573f54.tar.gz qemu-0a553c12c71d5627abf223a926ab9688a5573f54.tar.xz qemu-0a553c12c71d5627abf223a926ab9688a5573f54.zip |
Drop useless casts from g_malloc() & friends to pointer
These memory allocation functions return void *, and casting to
another pointer type is useless clutter. Drop these casts.
If you really want another pointer type, consider g_new().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220923120025.448759-3-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/char')
-rw-r--r-- | hw/char/exynos4210_uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index addcd59b02..7b7c56b6ef 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -211,7 +211,7 @@ static void fifo_reset(Exynos4210UartFIFO *q) g_free(q->data); q->data = NULL; - q->data = (uint8_t *)g_malloc0(q->size); + q->data = g_malloc0(q->size); q->sp = 0; q->rp = 0; |