Re: [Qemu-devel] [PATCH 51/88] hw/timer: use g_new() family of functions

2017-10-06 Thread xiaoqiang zhao

> 在 2017年10月7日,上午7:49,Philippe Mathieu-Daudé  写道:
> 
> From: Marc-André Lureau 
> 
> Signed-off-by: Marc-André Lureau 
> ---
> hw/timer/slavio_timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c
> index a8cc9c0148..6d0282a788 100644
> --- a/hw/timer/slavio_timer.c
> +++ b/hw/timer/slavio_timer.c
> @@ -385,7 +385,7 @@ static void slavio_timer_init(Object *obj)
>  uint64_t size;
>  char timer_name[20];
> 
> -tc = g_malloc0(sizeof(TimerContext));
> +tc = g_new0(TimerContext, 1);
>  tc->s = s;
>  tc->timer_index = i;
> 
> -- 
> 2.14.2

Resend due to email blocks.

Reviewed-by: xiaoqiang zhao 





Re: [Qemu-devel] [PATCH 51/88] hw/timer: use g_new() family of functions

2017-10-06 Thread xiaoqiang zhao

> 在 2017年10月7日,上午7:49,Philippe Mathieu-Daudé  写道:
> 
> From: Marc-André Lureau 
> 
> Signed-off-by: Marc-André Lureau 
> ---
> hw/timer/slavio_timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c
> index a8cc9c0148..6d0282a788 100644
> --- a/hw/timer/slavio_timer.c
> +++ b/hw/timer/slavio_timer.c
> @@ -385,7 +385,7 @@ static void slavio_timer_init(Object *obj)
>   uint64_t size;
>   char timer_name[20];
> 
> -tc = g_malloc0(sizeof(TimerContext));
> +tc = g_new0(TimerContext, 1);
>   tc->s = s;
>   tc->timer_index = i;
> 
> -- 
> 2.14.2

Reviewed-by: xiaoqiang zhao 




[Qemu-devel] [PATCH 51/88] hw/timer: use g_new() family of functions

2017-10-06 Thread Philippe Mathieu-Daudé
From: Marc-André Lureau 

Signed-off-by: Marc-André Lureau 
---
 hw/timer/slavio_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c
index a8cc9c0148..6d0282a788 100644
--- a/hw/timer/slavio_timer.c
+++ b/hw/timer/slavio_timer.c
@@ -385,7 +385,7 @@ static void slavio_timer_init(Object *obj)
 uint64_t size;
 char timer_name[20];
 
-tc = g_malloc0(sizeof(TimerContext));
+tc = g_new0(TimerContext, 1);
 tc->s = s;
 tc->timer_index = i;
 
-- 
2.14.2