[Top][All Lists]

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

Re: [Qemu-trivial] [PATCH] rocker: Use g_new() & friends where that make

From: Michael Tokarev
Subject: Re: [Qemu-trivial] [PATCH] rocker: Use g_new() & friends where that makes obvious sense
Date: Sat, 03 Oct 2015 20:05:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

24.09.2015 19:18, Markus Armbruster wrote:
> Michael, could you take this one through trivial?  Assuming Scott and
> Jiri don't mind, and with s/patchas/patch as/ in the commit message.
> Markus Armbruster <address@hidden> writes:
>> g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
>> for two reasons.  One, it catches multiplication overflowing size_t.
>> Two, it returns T * rather than void *, which lets the compiler catch
>> more type errors.

Applied to -trivial, thanks!


reply via email to

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