mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
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>
This commit is contained in:
parent
4bb5923605
commit
0a553c12c7
10 changed files with 15 additions and 17 deletions
|
@ -140,7 +140,7 @@ static void emulated_apdu_from_guest(CCIDCardState *base,
|
|||
const uint8_t *apdu, uint32_t len)
|
||||
{
|
||||
EmulatedState *card = EMULATED_CCID_CARD(base);
|
||||
EmulEvent *event = (EmulEvent *)g_malloc(sizeof(EmulEvent) + len);
|
||||
EmulEvent *event = g_malloc(sizeof(EmulEvent) + len);
|
||||
|
||||
assert(event);
|
||||
event->p.data.type = EMUL_GUEST_APDU;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue