Re: [PATCH 06/12] conf: Return any non-zero value from virDomainDeviceInfoIterateInternal callback

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

 



On Wed, Aug 16, 2017 at 04:57:55PM +0200, Peter Krempa wrote:
Post parse callbacks will need to be able to signal that they failed
non-fatally. This means that we need to return the value returned by the
callback without modification.
---
src/conf/domain_conf.c | 93 +++++++++++++++++++++++++-------------------------
1 file changed, 47 insertions(+), 46 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 298fe9b4e..f94317e52 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3570,146 +3570,147 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
                                   void *opaque)
{
    size_t i;
+    int ret;

Usually we only change the initial value of 'ret' at most once and
always end the function with 'return ret'.

Please name it 'rc' instead so it's not confused with this convention.

Jan

Attachment: signature.asc
Description: 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]
  Powered by Linux