[libvirt] [PATCH 3/3] Reverse the logic in virbitmaptest
Eric Blake
eblake at redhat.com
Fri Mar 6 19:56:13 UTC 2015
On 03/06/2015 10:02 AM, Ján Tomko wrote:
> Test the whole range in testBit, not just the first bit.
> ---
> tests/virbitmaptest.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
ACK.
> 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
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150306/52ed3d37/attachment-0001.sig>
More information about the libvir-list
mailing list