tests: virtnettlscontexttest: Use virGetLastErrorMessage()

Use virGetLastErrorMessage() rather than open code it
This commit is contained in:
Cole Robinson 2016-03-18 16:58:02 -04:00 committed by John Ferlan
parent f4a212d7f9
commit 4902231777

View File

@ -90,13 +90,12 @@ static int testTLSContextInit(const void *opaque)
goto cleanup;
}
} else {
virErrorPtr err = virGetLastError();
if (!data->expectFail) {
VIR_WARN("Unexpected failure %s against %s",
data->cacrt, data->crt);
goto cleanup;
}
VIR_DEBUG("Got error %s", err ? err->message : "<unknown>");
VIR_DEBUG("Got error %s", virGetLastErrorMessage());
}
ret = 0;