]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Prefer virGetLastErrorMessage in testSELinuxLabeling
authorJohn Ferlan <jferlan@redhat.com>
Mon, 10 Oct 2016 10:30:28 +0000 (06:30 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 10 Oct 2016 19:27:45 +0000 (15:27 -0400)
Yet another case of not needing virGetLastError processing

tests/securityselinuxlabeltest.c

index e98d9bb81ccc53098b8eaf69c22099f1b2c04783..1178acfecc0d60a8982231c1ac73dc3a6ee2144f 100644 (file)
@@ -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;
 }