[PATCH 4/6] util: virbitmap: Remove virBitmapCopy

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

 



The function is now unused.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/libvirt_private.syms |  1 -
 src/util/virbitmap.c     | 23 -----------------------
 src/util/virbitmap.h     |  6 ------
 3 files changed, 30 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 01ae3cad93..7cf8bea962 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1668,7 +1668,6 @@ virAuthConfigNewData;
 virBitmapClearAll;
 virBitmapClearBit;
 virBitmapClearBitExpand;
-virBitmapCopy;
 virBitmapCountBits;
 virBitmapDataFormat;
 virBitmapEqual;
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index c62438a3a6..3666033bac 100644
--- a/src/util/virbitmap.c
+++ b/src/util/virbitmap.c
@@ -100,29 +100,6 @@ virBitmapFree(virBitmapPtr bitmap)
 }


-/**
- * virBitmapCopy:
- * @dst: destination bitmap
- * @src: source bitmap
- *
- * Copies contents of @src to @dst. @dst must have the same size as @src.
- * Returns -1 if the size is not the same or 0 on success.
- */
-int
-virBitmapCopy(virBitmapPtr dst,
-              virBitmapPtr src)
-{
-    if (dst->nbits != src->nbits) {
-        errno = EINVAL;
-        return -1;
-    }
-
-    memcpy(dst->map, src->map, src->map_len * sizeof(src->map[0]));
-
-    return 0;
-}
-
-
 /**
  * virBitmapSetBit:
  * @bitmap: Pointer to bitmap
diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h
index cd5caa6f61..67a433672d 100644
--- a/src/util/virbitmap.h
+++ b/src/util/virbitmap.h
@@ -39,12 +39,6 @@ virBitmapPtr virBitmapNew(size_t size);
  */
 void virBitmapFree(virBitmapPtr bitmap);

-/*
- * Copy all bits from @src to @dst. The bitmap sizes
- * must be the same
- */
-int virBitmapCopy(virBitmapPtr dst, virBitmapPtr src);
-
 /*
  * Set bit position @b in @bitmap
  */
-- 
2.26.2




[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]

  Powered by Linux