util: introduce bitmap_try_new
commitbe4d57c1ea7f17b9cadb0150b330efd9b6026972
authorPeter Lieven <pl@kamp.de>
Tue, 30 Sep 2014 07:09:11 +0000 (30 09:09 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Sep 2014 11:30:51 +0000 (30 13:30 +0200)
treea33f866126446d10c955a1766c1965e359105bb1
parent49e7e31aa00a9fb466203de19120fe5c4459cac0
util: introduce bitmap_try_new

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 <pl@kamp.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/bitmap.h