[libvirt] [PATCHv2 3/5] qemu: Implement bulk stats API and one of the stats groups to return
Eric Blake
eblake at redhat.com
Tue Aug 26 19:14:37 UTC 2014
On 08/26/2014 01:06 PM, Peter Krempa wrote:
> On 08/26/14 21:02, Eric Blake wrote:
>> On 08/26/2014 08:14 AM, Peter Krempa wrote:
>>> Implement the API function for virDomainListGetStats and
>>> virConnectGetAllDomainStats in a modular way and implement the
>>> VIR_DOMAIN_STATS_STATE group of statistics.
>>> ---
>>> src/qemu/qemu_driver.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 175 insertions(+)
>>>
>
>>
>>> + cleanup:
>>> + if (dom)
>>> + virObjectUnlock(dom);
>>> +
>>
>> Useless if. virObjectUnlock(NULL) is safe. (Hmm, why isn't
>> syntax-check catching it?)
>>
>
> Actually not useless. virObjectUnlock should not be called with NULL.
> This doesn't crash but spews warnings:
Oh, I was confusing it with virObjectUnref(NULL), which IS safe.
Carry on, nothing to see here.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140826/60259830/attachment-0001.sig>
More information about the libvir-list
mailing list