
6 Mar
2015
6 Mar
'15
6:02 p.m.
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 1df5987..6b40d74 100644 --- a/tests/virbitmaptest.c +++ b/tests/virbitmaptest.c @@ -64,11 +64,11 @@ testBit(virBitmapPtr bitmap, size_t i; for (i = start; i <= end; i++) { - if (virBitmapGetBit(bitmap, i) == expected) - return 0; + if (virBitmapGetBit(bitmap, i) != expected) + return -1; } - return -1; + return 0; } static int -- 2.0.5