[libvirt] [PATCH] util: use VIR_(APPEND|DELETE)_ELEMENT for pci/usb device lists

Laine Stump laine at laine.org
Thu Jul 11 03:04:33 UTC 2013


On 07/08/2013 09:48 AM, Michal Privoznik wrote:
> On 05.07.2013 20:46, Laine Stump wrote:
>> Eliminate memmove() by using VIR_*_ELEMENT API instead.
>>
>> In both pci and usb cases, the count that held the size of the list
>> was unsigned int so it had to be changed to size_t.
>> ---
>> This is an alternate fix to the same problem fixed by
>>
>>   https://www.redhat.com/archives/libvir-list/2013-July/msg00324.html
>>
>> (an off by one bug in the conditional in virUSBDeviceListSteal()).
>>
>> This version fixes it by converting from open coded memmoves to using
>> VIR_(INSERT|DELETE)_ELEMENT.
>>
> ACK

Now that Michal has pushed the VIR_ALLOC OOM reporting patches (which
were a prerequisite to this), I rebased to the new (old) arglist for
VIR_APPEND_ELEMENT and pushed.

Thanks!




More information about the libvir-list mailing list