diff mbox series

[55/88] PReP: use g_new() family of functions

Message ID 20171006235023.11952-56-f4bug@amsat.org
State New
Headers show
Series use g_new() family of functions | expand

Commit Message

Philippe Mathieu-Daudé Oct. 6, 2017, 11:49 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 hw/ppc/prep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Gibson Oct. 7, 2017, 4:38 a.m. UTC | #1
On Fri, Oct 06, 2017 at 08:49:50PM -0300, Philippe Mathieu-Daudé wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  hw/ppc/prep.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index 94138a4e8c..c638d3d17a 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -512,7 +512,7 @@ static void ppc_prep_init(MachineState *machine)
>      int ppc_boot_device;
>      DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
>  
> -    sysctrl = g_malloc0(sizeof(sysctrl_t));
> +    sysctrl = g_new0(sysctrl_t, 1);
>  
>      linux_boot = (kernel_filename != NULL);
>
diff mbox series

Patch

diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 94138a4e8c..c638d3d17a 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -512,7 +512,7 @@  static void ppc_prep_init(MachineState *machine)
     int ppc_boot_device;
     DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
 
-    sysctrl = g_malloc0(sizeof(sysctrl_t));
+    sysctrl = g_new0(sysctrl_t, 1);
 
     linux_boot = (kernel_filename != NULL);