From 5989b00563937cdb582f3d01ae964856665c650f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Fri, 6 Mar 2015 17:55:38 +0100 Subject: [PATCH] Reverse the logic in virbitmaptest Test the whole range in testBit, not just the first bit. --- tests/virbitmaptest.c | 6 +++--- 1 file 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 -- 2.47.3