[libvirt] [PATCHv2 7/7] interface: implement a test driver for network config transaction API.

Laine Stump laine at laine.org
Thu May 26 15:53:26 UTC 2011


On 05/26/2011 04:18 AM, Michal Prívozník wrote:
> On 26.05.2011 07:30, Laine Stump wrote:
>> There *is* a problem in general with this function, though - dest is not
>> cleaned out before copying over the contents of src, so if it starts out
>> non-empty, there may be extra stuff in there at the end.
> Actually yes. So either rename this to virInterfaceObjListAppend()
> (virInterfaceAssignDef() appends to the end) or free list items of dest
> just before copying.

It doesn't exactly "append" either - if there is already an item with 
the same name, the new item will replace the existing item, otherwise it 
will be added to the list.

Based on that, I will change the function to clear out dest before it 
starts (even in the case that src is NULL).

I'm also fixing Dan's nits, removing the bogus conn->defs++, eliminating 
conn from the parameter list (not used), and adding 
virInterfraceObjListClone to libvirt_private.syms




More information about the libvir-list mailing list