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

[libvirt] [PATCH] virConnectGetLibVersion: Avoid error message on success.



From: Paolo Smiraglia <paolo smiraglia gmail com>

* src/libvirt.c (virConnectGetLibVersion): Don't emit error on
success.
---

Paolo, thanks for the report; I've rewritten it in patch form, with a
slight modification.  I think it is correct, but would like to hear
feedback from someone more experienced with the design to say whether
it was intentional before we push this.

 src/libvirt.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index cc5b4c5..c04489d 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -1660,8 +1660,8 @@ virConnectGetLibVersion(virConnectPtr conn, unsigned long *libVer)
         return ret;
     }

-   *libVer = LIBVIR_VERSION_NUMBER;
-    ret = 0;
+    *libVer = LIBVIR_VERSION_NUMBER;
+    return 0;
 error:
     virDispatchError(conn);
     return ret;
-- 
1.6.6.1


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