The function can't fail at this point. Remove the return value.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/util/virbitmap.c | 6 +-----
src/util/virbitmap.h | 4 ++--
src/util/virnuma.c | 3 +--
tests/virbitmaptest.c | 3 +--
4 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index 2b885803fd..c067b1f738 100644
--- a/src/util/virbitmap.c
+++ b/src/util/virbitmap.c
@@ -1164,10 +1164,8 @@ virBitmapIntersect(virBitmap *a,
* @b: other bitmap
*
* Performs union of two bitmaps: a = union(a, b)
- *
- * Returns 0 on success, <0 on failure.
*/
-int
+void
virBitmapUnion(virBitmap *a,
const virBitmap *b)
{
@@ -1178,8 +1176,6 @@ virBitmapUnion(virBitmap *a,
for (i = 0; i < b->map_len; i++)
a->map[i] |= b->map[i];
-
- return 0;
}
diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h
index 48074d1ae6..23242b44ff 100644
--- a/src/util/virbitmap.h
+++ b/src/util/virbitmap.h
@@ -133,8 +133,8 @@ bool virBitmapOverlaps(virBitmap *b1,
void virBitmapIntersect(virBitmap *a, virBitmap *b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-int virBitmapUnion(virBitmap *a,
- const virBitmap *b)
+void virBitmapUnion(virBitmap *a,
+ const virBitmap *b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
void virBitmapSubtract(virBitmap *a, virBitmap *b)
diff --git a/src/util/virnuma.c b/src/util/virnuma.c
index 31f65d8902..7c892d6267 100644
--- a/src/util/virnuma.c
+++ b/src/util/virnuma.c
@@ -333,8 +333,7 @@ virNumaNodesetToCPUset(virBitmap *nodeset,
return -1;
}
- if (virBitmapUnion(allNodesCPUs, nodeCPUs) < 0)
- return -1;
+ virBitmapUnion(allNodesCPUs, nodeCPUs);
}
*cpuset = g_steal_pointer(&allNodesCPUs);
diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c
index 1794f73f34..4c525679f6 100644
--- a/tests/virbitmaptest.c
+++ b/tests/virbitmaptest.c
@@ -665,8 +665,7 @@ test15(const void *opaque)
return -1;
}
- if (virBitmapUnion(amap, bmap) < 0)
- return -1;
+ virBitmapUnion(amap, bmap);
if (!virBitmapEqual(amap, resmap)) {
fprintf(stderr,
--
2.31.1