qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: Use g_new0() for a bit of extra type che


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH] block: Use g_new0() for a bit of extra type checking
Date: Thu, 04 Dec 2014 14:03:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 2014-12-04 at 13:55, Markus Armbruster wrote:
g_new(T, 1) is safer than g_malloc(sizeof(T)), because it returns T *
rather than void *, which lets the compiler catch more type errors.

Missed in commit 02c4f26.

Signed-off-by: Markus Armbruster <address@hidden>
---
  aio-posix.c | 2 +-
  aio-win32.c | 4 ++--
  async.c     | 2 +-
  3 files changed, 4 insertions(+), 4 deletions(-)

Thanks, applied to my block-next tree:

https://github.com/XanClic/qemu/commits/block-next



reply via email to

[Prev in Thread] Current Thread [Next in Thread]