aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/ppc405_uc.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2018-10-12 11:05:09 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2018-11-08 12:04:40 +1100
commit4fc4c6a53d69af50c4421857c749f84f927d09f6 (patch)
treec26144500fd3061441c406ccfcaa350c2788c69f /hw/ppc/ppc405_uc.c
parenta3dec427e01550d60d7f2f9dab535f86066c0973 (diff)
downloadqemu-4fc4c6a53d69af50c4421857c749f84f927d09f6.zip
qemu-4fc4c6a53d69af50c4421857c749f84f927d09f6.tar.gz
qemu-4fc4c6a53d69af50c4421857c749f84f927d09f6.tar.bz2
spapr_pci: convert g_malloc() to g_new()
When allocating an array, it is a recommended coding practice to call g_new(FooType, n) instead of g_malloc(n * sizeof(FooType)) because it takes care to avoid overflow when calculating the size of the allocated block and it returns FooType *, which allows the compiler to perform type checking. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/ppc405_uc.c')
0 files changed, 0 insertions, 0 deletions