From: Marc Hartmayer Date: Wed, 6 Jul 2016 12:02:27 +0000 (+0200) Subject: util: bitmap: Mention the size == 0 handling X-Git-Tag: v2.1.0-rc1~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd125c28b7a9e0ae58c0f34cb33e9dafa7fa664f;p=thirdparty%2Flibvirt.git util: bitmap: Mention the size == 0 handling As there is an explicit constructor for the special case of empty bitmaps, we should mention that the generic constructors rejects the creation of empty bitmaps. Reviewed-by: Boris Fiuczynski Reviewed-by: Sascha Silbe Reviewed-by: Bjoern Walk Signed-off-by: Marc Hartmayer --- diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 2029a735f7..3b85c16c1a 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -60,8 +60,8 @@ struct _virBitmap { * * Allocate a bitmap capable of containing @size bits. * - * Returns a pointer to the allocated bitmap or NULL if memory cannot be - * allocated. Does not report libvirt errors. + * Returns a pointer to the allocated bitmap or NULL if either memory cannot be + * allocated or size is 0. Does not report libvirt errors. */ virBitmapPtr virBitmapNewQuiet(size_t size) @@ -95,8 +95,8 @@ virBitmapNewQuiet(size_t size) * * Allocate a bitmap capable of containing @size bits. * - * Returns a pointer to the allocated bitmap or NULL if memory cannot be - * allocated. Reports libvirt errors. + * Returns a pointer to the allocated bitmap or NULL if either memory cannot be + * allocated or size is 0. Reports libvirt errors. */ virBitmapPtr virBitmapNew(size_t size)