diff options
author | Eric Auger <eric.auger@linaro.org> | 2015-06-11 09:44:40 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-06-11 14:22:57 +0100 |
commit | 0b70743d4f4f260b2fe6ed53fecc6bc6cda13910 (patch) | |
tree | e2e0d971738df0e199a36e43ccbac1ddb8886e47 /hw | |
parent | 169b71331eaff7a28e3d4fabe8733e7db91f01aa (diff) | |
download | qemu-0b70743d4f4f260b2fe6ed53fecc6bc6cda13910.tar.gz qemu-0b70743d4f4f260b2fe6ed53fecc6bc6cda13910.tar.bz2 qemu-0b70743d4f4f260b2fe6ed53fecc6bc6cda13910.zip |
hw/vfio/platform: replace g_malloc0_n by g_new0
g_malloc0_n() is introduced since glib-2.24 while QEMU currently
requires glib-2.22. This may cause a link error on some distributions.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/vfio/platform.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 35266a813c..9382bb7f36 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -346,8 +346,7 @@ static int vfio_populate_device(VFIODevice *vbasedev) return ret; } - vdev->regions = g_malloc0_n(vbasedev->num_regions, - sizeof(VFIORegion *)); + vdev->regions = g_new0(VFIORegion *, vbasedev->num_regions); for (i = 0; i < vbasedev->num_regions; i++) { struct vfio_region_info reg_info = { .argsz = sizeof(reg_info) }; |