summaryrefslogtreecommitdiff
path: root/tests/virbitmaptest.c
diff options
context:
space:
mode:
authorJán Tomko <jtomko@redhat.com>2015-03-06 17:55:38 +0100
committerJán Tomko <jtomko@redhat.com>2015-03-10 13:45:51 +0100
commit5989b00563937cdb582f3d01ae964856665c650f (patch)
tree440f289007c9fe71466aba6e86d5cc62c5997341 /tests/virbitmaptest.c
parent7b2f12fe28edb011e834fbf083c62c44e04d4f24 (diff)
downloadlibvirt-5989b00563937cdb582f3d01ae964856665c650f.tar.gz
Reverse the logic in virbitmaptest
Test the whole range in testBit, not just the first bit.
Diffstat (limited to 'tests/virbitmaptest.c')
-rw-r--r--tests/virbitmaptest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c
index ac5f2987d7..f24727594a 100644
--- a/tests/virbitmaptest.c
+++ b/tests/virbitmaptest.c
@@ -74,11 +74,11 @@ testBit(virBitmapPtr bitmap,
for (i = start; i <= end; i++) {
if (virBitmapGetBit(bitmap, i, &result) < 0)
return -1;
- if (result == expected)
- return 0;
+ if (result != expected)
+ return -1;
}
- return -1;
+ return 0;
}
static int