[PATCH 3/3] virGetLastErrorMessage in nodeinfotest

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

 



Use virGetLastErrorMessage in nodeinfotest.c to preserve the behavior
in previous patches
---
 tests/nodeinfotest.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c
index d8eace5..cc74ab5 100644
--- a/tests/nodeinfotest.c
+++ b/tests/nodeinfotest.c
@@ -44,10 +44,10 @@ linuxTestCompareFiles(char *sysfs_prefix,
     memset(&nodeinfo, 0, sizeof(nodeinfo));
     if (linuxNodeInfoCPUPopulate(sysfs_prefix, cpuinfo, arch, &nodeinfo) < 0) {
         if (virTestGetDebug()) {
-            virErrorPtr error = virSaveLastError();
-            if (error && error->code != VIR_ERR_OK)
-                VIR_TEST_DEBUG("\n%s\n", error->message);
-            virFreeError(error);
+            char const *msg = virGetLastErrorMessage();
+
+            if (msg)
+                VIR_TEST_DEBUG("\n%s\n", msg);
         }
         VIR_FORCE_FCLOSE(cpuinfo);
         goto fail;
-- 
2.5.5

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