diff options
author | Markus Armbruster <armbru@redhat.com> | 2022-09-23 14:00:24 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2022-10-22 23:15:40 +0200 |
commit | 0a553c12c71d5627abf223a926ab9688a5573f54 (patch) | |
tree | 95184e811f9e92c0b734e83e2af3a57a80d18536 /target/i386/whpx | |
parent | 4bb5923605b2b8994f933df23aa948efe7ba545c (diff) | |
download | qemu-0a553c12c71d5627abf223a926ab9688a5573f54.zip qemu-0a553c12c71d5627abf223a926ab9688a5573f54.tar.gz qemu-0a553c12c71d5627abf223a926ab9688a5573f54.tar.bz2 |
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 'target/i386/whpx')
-rw-r--r-- | target/i386/whpx/whpx-all.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 8e4969e..e738d83 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -1164,9 +1164,8 @@ static void whpx_translate_cpu_breakpoints( (breakpoints->breakpoints ? breakpoints->breakpoints->used : 0); struct whpx_breakpoint_collection *new_breakpoints = - (struct whpx_breakpoint_collection *)g_malloc0( - sizeof(struct whpx_breakpoint_collection) + - max_breakpoints * sizeof(struct whpx_breakpoint)); + g_malloc0(sizeof(struct whpx_breakpoint_collection) + + max_breakpoints * sizeof(struct whpx_breakpoint)); new_breakpoints->allocated = max_breakpoints; new_breakpoints->used = 0; |