Reverse the logic in virbitmaptest

Test the whole range in testBit, not just the first bit.
This commit is contained in:
Ján Tomko 2015-03-06 17:55:38 +01:00
parent 7b2f12fe28
commit 5989b00563

View File

@ -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