On Sat, Dec 5, 2009 at 6:44 PM, Avi Kivity <a...@redhat.com> 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