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

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



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);



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