qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Make qemu_alloc()/qemu_realloc() return NULL for size==0 (wa


From: Jamie Lokier
Subject: Re: [PATCH] Make qemu_alloc()/qemu_realloc() return NULL for size==0 (was Re: [Qemu-devel] [PATCH] fix qemu_malloc() error check for size==0)
Date: Tue, 19 May 2009 21:34:27 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

malc wrote:
> Thanks for an attempt, but i don't like it either, since it sortof
> breaks the (unspoken?) qemu_malloc/realloc contract that those will
> never return NULL. I've commited the thing i had in mind.

realloc returns NULL if the size is zero, and frees the object if the
pointer is non-NULL.

-- Jamie




reply via email to

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