qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends


From: Laurent Desnogues
Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends
Date: Sat, 5 Dec 2009 19:16:02 +0100

On Sat, Dec 5, 2009 at 6:44 PM, Avi Kivity <address@hidden> wrote:
[...]
>
>> I think Laurent's proposal would work. We even could go so far as
>> rename the current function as qemu_malloc_possibly_broken (and adjust
>> callers mechanically) and introduce two new versions, which handle the
>> zero case in clearly advertised ways. Patches would fix the callers to
>> use the correct one
>
> Good idea.  Let's name the function that returns a valid pointer
> qemu_malloc() (since that's what many callers expect anyway, and it's fully
> backwards compatible), and see who calls
> qemu_malloc_dont_call_me_with_zero().

Yes, you're always free to follow poor coding rules by breaking strict
API.


Laurent




reply via email to

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