qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] linux-user: Use g_new() & friend


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

24.09.2015 10:18, Stefan Weil wrote:
> Am 24.09.2015 um 09:06 schrieb Markus Armbruster:
>> Ping?
> 
>> 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, with a trivial commit message fix.
Thanks!

/mjt



reply via email to

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