Re: [PATCH 1/3] util: Add a helper to check if all bits of a bitmap are clear

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 02, 2013 at 06:52:22AM -0400, John Ferlan wrote:
> On 04/02/2013 01:42 AM, Osier Yang wrote:
> > ---
> >  src/libvirt_private.syms |  1 +
> >  src/util/virbitmap.c     | 30 ++++++++++++++++++++++++++++++
> >  src/util/virbitmap.h     |  3 +++
> >  3 files changed, 34 insertions(+)
> > 
> 
> Since there already is a "virBitmapIsAllSet()" - why isn't it used?  I
> see callers which do "if (virBitmapIsAllSet(...)" and "if
> (!virBitmapIsAllSet(...)".
> 
> If you're going to have a AllClear(), then why not change those !
> callers to use AllClear()...

!virBitmapIsAllSet() is not the same as virBitmapIsAllClear().

!virBitmapIsAllSet() allows for [0 -> (n-1)] bits to be set,
whereas virBitmapIsAllClear() only allows for 0 bits to be
set.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]