summaryrefslogtreecommitdiff
path: root/tests/virbitmaptest.c
diff options
context:
space:
mode:
authorPeter Krempa <pkrempa@redhat.com>2020-10-01 17:42:11 +0200
committerPeter Krempa <pkrempa@redhat.com>2020-10-05 15:38:47 +0200
commitcb6fdb012583bbd92d48d8709c6f3b1706748c66 (patch)
tree514f45808773afe8f0fb2dd969ad6574d70cbe42 /tests/virbitmaptest.c
parentbab5a79d6a8752b9129d94e65dbea366a4fa3de6 (diff)
downloadlibvirt-cb6fdb012583bbd92d48d8709c6f3b1706748c66.tar.gz
virBitmapNew: Don't check return value
Remove return value check from all callers. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'tests/virbitmaptest.c')
-rw-r--r--tests/virbitmaptest.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c
index efdce51c3b..77a58f0176 100644
--- a/tests/virbitmaptest.c
+++ b/tests/virbitmaptest.c
@@ -61,8 +61,7 @@ test1(const void *data G_GNUC_UNUSED)
size = 1024;
bit = 100;
- if (!(bitmap = virBitmapNew(size)))
- return -1;
+ bitmap = virBitmapNew(size);
if (virBitmapSetBit(bitmap, bit) < 0)
return -1;
@@ -165,8 +164,7 @@ test3(const void *data G_GNUC_UNUSED)
int size = 5;
size_t i;
- if ((bitmap = virBitmapNew(size)) == NULL)
- return -1;
+ bitmap = virBitmapNew(size);
for (i = 0; i < size; i++)
ignore_value(virBitmapSetBit(bitmap, i));
@@ -214,8 +212,6 @@ test4b(const void *data G_GNUC_UNUSED)
/* 1. zero set */
bitmap = virBitmapNew(size);
- if (!bitmap)
- return -1;
if (virBitmapNextSetBit(bitmap, -1) != -1)
return -1;
@@ -375,8 +371,6 @@ test6(const void *v G_GNUC_UNUSED)
int size = 64;
bitmap = virBitmapNew(size);
- if (!bitmap)
- return -1;
if (checkBitmap(bitmap, "", -1) < 0)
return -1;
@@ -425,8 +419,6 @@ test7(const void *v G_GNUC_UNUSED)
for (i = 0; i < nmaxBit; i++) {
g_autoptr(virBitmap) bitmap = virBitmapNew(maxBit[i]);
- if (!bitmap)
- return -1;
if (virBitmapIsAllSet(bitmap))
return -1;