Re: [PATCH v2 09/11] interface: Introduce virInterfaceObjEndAPI

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

 




On 05/26/2017 08:56 AM, Peter Krempa wrote:
> On Fri, May 26, 2017 at 07:59:08 -0400, John Ferlan wrote:
>> For now it'll just call the virInterfaceObjUnlock, but a future adjustment
>> will do something different.
>>
>> The virInterfaceObjUnlock is now private to virinterfaceobj.c with a
>> short term forward reference.
>>
>> Additionally, make virInterfaceObjLock private since it's only used in
>> virinterfaceobj anyway. For now this will involved creating a forward
>> reference, but this will go away soon too.
>>
>> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
>> ---
>>  src/conf/virinterfaceobj.c | 17 +++++++++++++++--
>>  src/conf/virinterfaceobj.h |  9 +++------
>>  src/libvirt_private.syms   |  3 +--
>>  src/test/test_driver.c     | 15 +++++++--------
>>  4 files changed, 26 insertions(+), 18 deletions(-)
> 
> [...]
> 
>>
>> @@ -82,6 +85,16 @@ virInterfaceObjUnlock(virInterfaceObjPtr obj)
>>  
>>  
>>  void
>> +virInterfaceObjEndAPI(virInterfaceObjPtr *obj)
>> +{
>> +    if (!*obj)
>> +        return;
>> +
>> +    virInterfaceObjUnlock(*obj);
> 
> The double pointer is really pointless in this function. Did you forget
> to set it to NULL after the unlock as we do in the other EndAPI
> functions?
> 

Well... It was a way to avoid having more changes in the "next" patch.
The reality is this and the next one were one at one time, but I figured
I could extract out one and make the following one a bit easier to read.

I can combine them into one if that's desired.

Tks -

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux