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

[libvirt] [PATCH 8/8] Always clear out the last_error in virshReportError.



Otherwise you can get bogus "unknown error" printouts on
subsequent commands.

Signed-off-by: Chris Lalancette <clalance redhat com>
---
 tools/virsh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 6a22071..6b7580b 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -390,7 +390,7 @@ virshReportError(void)
          * no error was ever raised, so just ignore */
         last_error = virSaveLastError();
         if (!last_error || last_error->code == VIR_ERR_OK)
-            return;
+            goto out;
     }
 
     if (last_error->code == VIR_ERR_OK) {
-- 
1.7.1.1


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