Re: [PATCH 1/2] Add simple bitmap operations to utils

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

 



On Mon, 2010-05-17 at 14:05 -0600, Eric Blake wrote:
> On 05/17/2010 12:09 PM, Jim Fehlig wrote:

> 
> > +{
> > +    virBitmap bit = bitmap[VIR_BITMAP_UNIT_OFFSET(b)] &
> > +          (1 << VIR_BITMAP_BIT_OFFSET(b));
> 
> Should these interfaces add sanity checks that b is in range (that is,
> smaller than the original allocated size)?  Do we want to support
> dynamically-growing bitsets?

Right, should hold the number of elements it has. I think range checking
would be a good idea.

   Stefan


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