[PATCH 2/3] util: bitmap: Mention the size == 0 handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Sascha Silbe <silbe@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
---
 src/util/virbitmap.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index 2029a73..3b85c16 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)
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]