Markus Armbruster writes:
> Philippe Mathieu-Daudé writes:
>
>> On 15/3/22 14:59, Markus Armbruster wrote:
>>> Alex Bennée writes:
>>>
Markus Armbruster writes:
> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
> for two reasons. One, it catches mult
Philippe Mathieu-Daudé writes:
> On 15/3/22 14:59, Markus Armbruster wrote:
>> Alex Bennée writes:
>>
>>> Markus Armbruster 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,
On 15/3/22 14:59, Markus Armbruster wrote:
Alex Bennée writes:
Markus Armbruster 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
Eric Blake writes:
> On Mon, Mar 14, 2022 at 05:01:08PM +0100, Markus Armbruster wrote:
>> 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 compil
Alex Bennée writes:
> Markus Armbruster 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.
>>
>
>
Alex Bennée writes:
> Markus Armbruster 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.
>>
>> T
* Markus Armbruster (arm...@redhat.com) wrote:
> 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.
>
> This commit
On Mon, Mar 14, 2022 at 05:01:08PM +0100, Markus Armbruster wrote:
> 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 error
Markus Armbruster 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.
>
> diff --git a/semihosting/conf
On Montag, 14. März 2022 20:48:47 CET Alex Bennée wrote:
> Markus Armbruster 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 compile
Markus Armbruster 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.
>
> This commit only touches alloc
On Mon, Mar 14, 2022 at 05:52:32PM +0100, Markus Armbruster wrote:
> Peter Maydell writes:
>
> > On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote:
> >>
> >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
> >> for two reasons. One, it catches multiplication overflowin
On 3/14/22 17:01, Markus Armbruster wrote:
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.
This commit only touches a
Peter Maydell writes:
> On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote:
>>
>> 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 ca
On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote:
>
> 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.
>
> Th
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.
This commit only touches allocations with size arguments of the form
si
16 matches
Mail list logo