[libvirt] [PATCH v2 2/9] New functions for virBitmap
Eric Blake
eblake at redhat.com
Fri Sep 7 05:23:49 UTC 2012
On 09/06/2012 11:17 PM, Eric Blake wrote:
> On 09/06/2012 04:13 AM, Hu Tao wrote:
>> In many places we store bitmap info in a chunk of data
>> (pointed to by a char *), and have redundant codes to
>> set/unset bits. This patch extends virBitmap, and convert
>> those codes to use virBitmap in subsequent patches.
>> ---
>
>>
>> struct _virBitmap {
>> - size_t size;
>> - unsigned long *map;
>> + size_t size; /* size in bits */
>> + size_t size2; /* size in LONGs */
>
> The name 'size2' isn't very descriptive. Maybe we should rename to
> s/size/max_bit/ and s/size2/map_len/ for easier reading?
If you go with the rename idea, then I'd split this into two patches -
one that introduces the new field and names and retrofits all existing
functions, but adds no new code other than the use of the new field; and
the second that only adds the new functions.
--
Eric Blake eblake at 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: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120906/3942458e/attachment-0001.sig>
More information about the libvir-list
mailing list