From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0cRr-0001ku-DG for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:54:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0cRp-0007V4-33 for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:54:31 -0400 Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 6 Oct 2017 20:50:02 -0300 Message-Id: <20171006235023.11952-68-f4bug@amsat.org> In-Reply-To: <20171006235023.11952-1-f4bug@amsat.org> References: <20171006235023.11952-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 67/88] util/coroutine: use g_new() family of functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster , Eric Blake , Stefan Hajnoczi , Kevin Wolf Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu trival Signed-off-by: Philippe Mathieu-Daudé --- util/coroutine-sigaltstack.c | 2 +- util/coroutine-ucontext.c | 2 +- util/coroutine-win32.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c index f6fc49a0e5..4fe4bbf1b5 100644 --- a/util/coroutine-sigaltstack.c +++ b/util/coroutine-sigaltstack.c @@ -163,7 +163,7 @@ Coroutine *qemu_coroutine_new(void) * sigaltstack way of manipulating stacks. */ - co = g_malloc0(sizeof(*co)); + co = g_new0(CoroutineSigAltStack, 1); co->stack_size = COROUTINE_STACK_SIZE; co->stack = qemu_alloc_stack(&co->stack_size); co->base.entry_arg = &old_env; /* stash away our jmp_buf */ diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 6621f3f692..c14dca19b4 100644 --- a/util/coroutine-ucontext.c +++ b/util/coroutine-ucontext.c @@ -100,7 +100,7 @@ Coroutine *qemu_coroutine_new(void) abort(); } - co = g_malloc0(sizeof(*co)); + co = g_new0(CoroutineUContext, 1); co->stack_size = COROUTINE_STACK_SIZE; co->stack = qemu_alloc_stack(&co->stack_size); co->base.entry_arg = &old_env; /* stash away our jmp_buf */ diff --git a/util/coroutine-win32.c b/util/coroutine-win32.c index de6bd4fd3e..6762ff83c2 100644 --- a/util/coroutine-win32.c +++ b/util/coroutine-win32.c @@ -74,7 +74,7 @@ Coroutine *qemu_coroutine_new(void) const size_t stack_size = COROUTINE_STACK_SIZE; CoroutineWin32 *co; - co = g_malloc0(sizeof(*co)); + co = g_new0(CoroutineWin32, 1); co->fiber = CreateFiber(stack_size, coroutine_trampoline, &co->base); return &co->base; } -- 2.14.2