提交 49022317 编写于 作者: C Cole Robinson 提交者: John Ferlan

tests: virtnettlscontexttest: Use virGetLastErrorMessage()

Use virGetLastErrorMessage() rather than open code it
上级 f4a212d7
...@@ -90,13 +90,12 @@ static int testTLSContextInit(const void *opaque) ...@@ -90,13 +90,12 @@ static int testTLSContextInit(const void *opaque)
goto cleanup; goto cleanup;
} }
} else { } else {
virErrorPtr err = virGetLastError();
if (!data->expectFail) { if (!data->expectFail) {
VIR_WARN("Unexpected failure %s against %s", VIR_WARN("Unexpected failure %s against %s",
data->cacrt, data->crt); data->cacrt, data->crt);
goto cleanup; goto cleanup;
} }
VIR_DEBUG("Got error %s", err ? err->message : "<unknown>"); VIR_DEBUG("Got error %s", virGetLastErrorMessage());
} }
ret = 0; ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册