aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/nseries.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2022-09-23 14:00:24 +0200
committerLaurent Vivier <laurent@vivier.eu>2022-10-22 23:15:40 +0200
commit0a553c12c71d5627abf223a926ab9688a5573f54 (patch)
tree95184e811f9e92c0b734e83e2af3a57a80d18536 /hw/arm/nseries.c
parent4bb5923605b2b8994f933df23aa948efe7ba545c (diff)
downloadqemu-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 'hw/arm/nseries.c')
-rw-r--r--hw/arm/nseries.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
index 692c94c..b151113 100644
--- a/hw/arm/nseries.c
+++ b/hw/arm/nseries.c
@@ -702,7 +702,7 @@ static uint32_t mipid_txrx(void *opaque, uint32_t cmd, int len)
static void *mipid_init(void)
{
- struct mipid_s *s = (struct mipid_s *) g_malloc0(sizeof(*s));
+ struct mipid_s *s = g_malloc0(sizeof(*s));
s->id = 0x838f03;
mipid_reset(s);
@@ -1300,7 +1300,7 @@ static int n810_atag_setup(const struct arm_boot_info *info, void *p)
static void n8x0_init(MachineState *machine,
struct arm_boot_info *binfo, int model)
{
- struct n800_s *s = (struct n800_s *) g_malloc0(sizeof(*s));
+ struct n800_s *s = g_malloc0(sizeof(*s));
MachineClass *mc = MACHINE_GET_CLASS(machine);
if (machine->ram_size != mc->default_ram_size) {