From c66150eca16a1a17e25b696363974177d9c40c27 Mon Sep 17 00:00:00 2001 From: Jovanka Gulicoska Date: Thu, 19 May 2016 21:10:18 +0200 Subject: tests: More usage of virGetLastErrorMessage() Use virGetLastErrorMessage() instead of virGetLastError() in tests --- tests/securityselinuxtest.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/securityselinuxtest.c') 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; } -- cgit v1.2.1