Re: [Qemu-devel] [PATCHv2 1/2] util: introduce bitmap_try_new

2014-10-01 Thread Dr. David Alan Gilbert
* Peter Lieven (p...@kamp.de) wrote: > regular bitmap_new simply aborts if the memory allocation fails. > bitmap_try_new returns NULL on failure and allows for proper > error handling. > > Signed-off-by: Peter Lieven > --- > include/qemu/bitmap.h | 13 +++-- > 1 file changed, 11 insert

[Qemu-devel] [PATCHv2 1/2] util: introduce bitmap_try_new

2014-09-30 Thread Peter Lieven
regular bitmap_new simply aborts if the memory allocation fails. bitmap_try_new returns NULL on failure and allows for proper error handling. Signed-off-by: Peter Lieven --- include/qemu/bitmap.h | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/qemu/bi