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

Re: [libvirt] [PATCH v2 11/20] network: Introduce virNetworkObj{Get|Set}Autostart



[...]

>>
>> I think because it was an external API provided value I left it at
>> 'int'. For the other two active and persistent - those are boolean
>> states as a result of other internal operations and not outwardly
>> facing.  IOW: There's no virNetworkSetPersistent or virNetworkSetActive
>> type API's.
>>
>> I think also the GetAutostart algorithm which assigns *autostart =
>> obj->autostart caused me to pause especially since the code is
>> "repeated" in domain, storage, and test. Initially I think I was
>> thinking of combining all those places that make the same sequence of
>> calls, but that got shot down. I think changing it to a bool would
>> probably be a "next step" exercise, but "technically", the Get algorithm
>> would be *autostart = obj->autostart ? 1 : 0; as opposed to the current
>> *autostart = obj->autostart;
> 
> I don't think that different get is a problem. But okay, I don't care
> that much to stop this. If you want to change it to bool do, if not I
> can live with that too.
> 
> ACK if you fix the mem leak issue.
> 
> Michal
> 

Alright - I changed to @bool... I also changed GetAutostart to be
IsAutostart, but otherwise was (mostly) simple except for merges in the
subsequent 2 patches.

John


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