Re: [libvirt] [PATCH] bitmap: add way to find next clear bit

2013-02-05 Thread Eric Blake
On 02/04/2013 04:31 PM, Stefan Berger wrote: > On 02/04/2013 03:53 PM, Eric Blake wrote: >> On 02/01/2013 09:41 PM, Stefan Berger wrote: >>> On 02/01/2013 09:16 PM, Eric Blake wrote: >>> I definitely prefer the ARRAY_CARDINALITY() instead of npos in my >>> version of the test. Beyond that, it looks

Re: [libvirt] [PATCH] bitmap: add way to find next clear bit

2013-02-04 Thread Stefan Berger
On 02/04/2013 03:53 PM, Eric Blake wrote: On 02/01/2013 09:41 PM, Stefan Berger wrote: On 02/01/2013 09:16 PM, Eric Blake wrote: I definitely prefer the ARRAY_CARDINALITY() instead of npos in my version of the test. Beyond that, it looks like your test copied and pasted so that the set vs. cle

Re: [libvirt] [PATCH] bitmap: add way to find next clear bit

2013-02-04 Thread Eric Blake
On 02/01/2013 09:41 PM, Stefan Berger wrote: > On 02/01/2013 09:16 PM, Eric Blake wrote: >> We had an easy way to iterate set bits, but not for iterating >> cleared bits. >> >> * src/util/virbitmap.h (virBitmapNextClearBit): New prototype. >> * src/util/virbitmap.c (virBitmapNextClearBit): Implemen

Re: [libvirt] [PATCH] bitmap: add way to find next clear bit

2013-02-01 Thread Stefan Berger
On 02/01/2013 09:16 PM, Eric Blake wrote: We had an easy way to iterate set bits, but not for iterating cleared bits. * src/util/virbitmap.h (virBitmapNextClearBit): New prototype. * src/util/virbitmap.c (virBitmapNextClearBit): Implement it. * src/libvirt_private.syms (bitmap.h): Export it. * t

[libvirt] [PATCH] bitmap: add way to find next clear bit

2013-02-01 Thread Eric Blake
We had an easy way to iterate set bits, but not for iterating cleared bits. * src/util/virbitmap.h (virBitmapNextClearBit): New prototype. * src/util/virbitmap.c (virBitmapNextClearBit): Implement it. * src/libvirt_private.syms (bitmap.h): Export it. * tests/virbitmaptest.c (test4): Test it. ---