diff options
author | Jovanka Gulicoska <jovanka.gulicoska@gmail.com> | 2016-05-19 21:10:18 +0200 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2016-05-19 15:17:03 -0400 |
commit | c66150eca16a1a17e25b696363974177d9c40c27 (patch) | |
tree | cc89275f542c78c7ff3c53baed47c645579e74ee /tests/securityselinuxtest.c | |
parent | ee7e99feb3c6fb89ebbe3dc967b01fbce0e7131f (diff) | |
download | libvirt-c66150eca16a1a17e25b696363974177d9c40c27.tar.gz |
tests: More usage of virGetLastErrorMessage()
Use virGetLastErrorMessage() instead of virGetLastError() in tests
Diffstat (limited to 'tests/securityselinuxtest.c')
-rw-r--r-- | tests/securityselinuxtest.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/securityselinuxtest.c b/tests/securityselinuxtest.c index 49694f3fc5..3423e664c6 100644 --- a/tests/securityselinuxtest.c +++ b/tests/securityselinuxtest.c @@ -230,8 +230,7 @@ testSELinuxGenLabel(const void *opaque) goto cleanup; if (virSecurityManagerGenLabel(data->mgr, def) < 0) { - virErrorPtr err = virGetLastError(); - fprintf(stderr, "Cannot generate label: %s\n", err->message); + fprintf(stderr, "Cannot generate label: %s\n", virGetLastErrorMessage()); goto cleanup; } @@ -275,9 +274,8 @@ mymain(void) if (!(mgr = virSecurityManagerNew("selinux", "QEMU", VIR_SECURITY_MANAGER_DEFAULT_CONFINED | VIR_SECURITY_MANAGER_PRIVILEGED))) { - virErrorPtr err = virGetLastError(); fprintf(stderr, "Unable to initialize security driver: %s\n", - err->message); + virGetLastErrorMessage()); return EXIT_FAILURE; } |