Re: [PATCH 1/5] Introduce a more convenient virCgroupNewDetectMachine

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

 



On 07/25/2013 12:11 PM, Daniel P. Berrange wrote:

>>>  
>>> +/*
>>> + * Returns 0 on success, -1 on fatal error, -2 on no valid cgroup
>>> + */
>>> +int virCgroupNewDetectMachine(const char *name,

>>> +
>>> +    if (!virCgroupIsValidMachineGroup(*group, name, drivername)) {
>>> +        virCgroupFree(group);
>>> +        return 0;
>>
>> Huh? This says you are returning success.  Also, none of the lxc or qemu
>> callers checked for a -2 return; do you really need the differentiated
>> return type?
> 
> Opps the comment is wrong. I originally had it returning -2, but I
> removed that and just useed '0' and let the caller check if 'group != NULL'
> instead.

Ah, then ACK with a fixed doc comment that describes the real convention.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]