mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
spapr: use g_new(T, n) instead of g_malloc(sizeof(T) * n)
Because it is a recommended coding practice (see HACKING). Signed-off-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
cc226c068f
commit
dec4ec40a1
2 changed files with 2 additions and 2 deletions
|
@ -93,7 +93,7 @@ static uint64_t *spapr_tce_alloc_table(uint32_t liobn,
|
|||
|
||||
if (!table) {
|
||||
*fd = -1;
|
||||
table = g_malloc0(nb_table * sizeof(uint64_t));
|
||||
table = g_new0(uint64_t, nb_table);
|
||||
}
|
||||
|
||||
trace_spapr_iommu_new_table(liobn, table, *fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue