]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: bitmap: Mention the size == 0 handling
authorMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Wed, 6 Jul 2016 12:02:27 +0000 (14:02 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 9 Jul 2016 09:03:32 +0000 (11:03 +0200)
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 <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
src/util/virbitmap.c

index 2029a735f7d67c9bd6ec2127f9ff62da80984812..3b85c16c1a609e75a05844b4e12720d9062568f8 100644 (file)
@@ -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)