[libvirt] [PATCHv2 01/21] virCaps: conf: start splitting out irrelevat data

Laine Stump laine at laine.org
Thu Mar 7 18:44:50 UTC 2013


On 03/07/2013 12:46 PM, Peter Krempa wrote:
> On 03/07/13 18:42, Laine Stump wrote:
>> On 03/07/2013 11:50 AM, Daniel P. Berrange wrote:
>>> On Wed, Mar 06, 2013 at 04:37:45PM +0100, Peter Krempa wrote:
>
>>>> +
>>>> +    return xmlconf;
>>>> +}
>>>> +
>>>> +virDomainXMLNamespace
>>>> +virDomainXMLConfGetNamespace(virDomainXMLConfPtr xmlconf)
>>>> +{
>>>> +    return xmlconf->ns;
>>>> +}
>>
>> You're returning a struct there, rather than a pointer to a struct. Do
>> you really want to restrict yourself that way?
>>
>
> This API is internal and returning the struct saves a few lines of
> code in the single place it is called.

No saved lines. Just do this:

def->ns = *virDomainXMLConfGetNamespace(xmlconf);





More information about the libvir-list mailing list