
21 Jul
2010
21 Jul
'10
5:37 p.m.
On 07/21/2010 09:21 AM, Daniel Veillard wrote:
ACK, but it seems to me ret being initialized to -1, maybe it's better to be consistent and on all error do a ret = -errno; before virReportSystemError and the goto cleanup.
If you have the convention of returning -errno, then you must not return -1 unless you meant to report EPERM. I agree with Laine's approach of initializing to 0 in this case, since you don't want to leak an unintended -1 if that was not the real error. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org