[libvirt] [PATCH] nodedev: Return the parent for a virNodeDevicePtr struct
Ján Tomko
jtomko at redhat.com
Thu Feb 16 16:31:01 UTC 2017
On Thu, Feb 09, 2017 at 02:23:47PM -0500, John Ferlan wrote:
>
>
>On 02/09/2017 07:39 AM, Bjoern Walk wrote:
>
>[...]
>
>>> }
>>> diff --git a/src/test/test_driver.c b/src/test/test_driver.c
>>> index 6820298..8dd738b 100644
>>> --- a/src/test/test_driver.c
>>> +++ b/src/test/test_driver.c
>>> @@ -5450,7 +5450,10 @@ testNodeDeviceLookupByName(virConnectPtr conn,
>>> const char *name)
>>> goto cleanup;
>>> }
>>>
>>> - ret = virGetNodeDevice(conn, name);
>>> + if ((ret = virGetNodeDevice(conn, name))) {
>>> + if (VIR_STRDUP(ret->parent, obj->def->parent) < 0)
>>> + virObjectUnref(ret);
>>> + }
>>>
>>> cleanup:
>>> if (obj)
>>> @@ -5648,6 +5651,7 @@ testNodeDeviceCreateXML(virConnectPtr conn,
>>> 0);
>>>
>>> dev = virGetNodeDevice(conn, def->name);
>>> + ignore_value(VIR_STRDUP(def->parent, def->parent));
>>
>> One of those should be dev probably.
>>
>
>Oh right goog catch... It should be VIR_STRDUP(dev->parent, def->parent)
>
>I've fixed in my local branch
ACK with that fix.
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170216/a74326d0/attachment-0001.sig>
More information about the libvir-list
mailing list