Received: from eggs.gnu.org ([2001:4830:134:3::10]:34365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0dGt-0006d6-S0 for qemu-devel@nongnu.org; Fri, 06 Oct 2017 20:47:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0dGq-0002Sb-QH for qemu-devel@nongnu.org; Fri, 06 Oct 2017 20:47:15 -0400 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (1.0) From: xiaoqiang zhao In-Reply-To: <20171006235023.11952-52-f4bug@amsat.org> Date: Sat, 7 Oct 2017 08:46:50 +0800 Content-Transfer-Encoding: quoted-printable Message-Id: <2F978D95-3433-4ABB-8421-B43017497006@163.com> References: <20171006235023.11952-1-f4bug@amsat.org> <20171006235023.11952-52-f4bug@amsat.org> Subject: Re: [Qemu-devel] [PATCH 51/88] hw/timer: use g_new() family of functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?GB2312?Q?Philippe_Mathieu-Daud=A8=A6?= Cc: =?GB2312?Q?Marc-Andr=A8=A6_Lureau?= , Markus Armbruster , Eric Blake , Mark Cave-Ayland , Artyom Tarasenko , Kevin Wolf , =?GB2312?Q?Marc-Andr=A8=A6_Lureau?= , qemu trival , qemu-devel@nongnu.org > =D4=DA 2017=C4=EA10=D4=C27=C8=D5=A3=AC=C9=CF=CE=E77:49=A3=ACPhilippe Mathi= eu-Daud=A8=A6 =D0=B4=B5=C0=A3=BA >=20 > From: Marc-Andr=A8=A6 Lureau >=20 > Signed-off-by: Marc-Andr=A8=A6 Lureau > --- > hw/timer/slavio_timer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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]; >=20 > - tc =3D g_malloc0(sizeof(TimerContext)); > + tc =3D g_new0(TimerContext, 1); > tc->s =3D s; > tc->timer_index =3D i; >=20 > --=20 > 2.14.2 Reviewed-by: xiaoqiang zhao =