[libvirt] [PATCH v2 09/11] interface: Introduce virInterfaceObjEndAPI
John Ferlan
jferlan at redhat.com
Fri May 26 13:55:13 UTC 2017
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 at redhat.com>
>> ---
>> 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
More information about the libvir-list
mailing list