[PATCH 2/7] tests: Prefer virGetLastErrorMessage in testSELinuxLabeling

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

 



Yet another case of not needing virGetLastError processing

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 tests/securityselinuxlabeltest.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c
index e98d9bb..1178acf 100644
--- a/tests/securityselinuxlabeltest.c
+++ b/tests/securityselinuxlabeltest.c
@@ -331,10 +331,8 @@ testSELinuxLabeling(const void *opaque)
         VIR_FREE(files[i].context);
     }
     VIR_FREE(files);
-    if (ret < 0) {
-        virErrorPtr err = virGetLastError();
-        VIR_TEST_VERBOSE("%s\n", err ? err->message : "<unknown>");
-    }
+    if (ret < 0)
+        VIR_TEST_VERBOSE("%s\n", virGetLastErrorMessage());
     return ret;
 }
 
-- 
2.7.4

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