提交 335bc13c 编写于 作者: M Martin Kletzander

admin: Be consistent when resetting errors

Resetting an error should be the first thing public API does.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 724d5340
......@@ -371,11 +371,12 @@ virAdmConnectIsAlive(virAdmConnectPtr conn)
VIR_DEBUG("conn=%p", conn);
virResetLastError();
if (!conn)
return 0;
virCheckAdmConnectReturn(conn, -1);
virResetLastError();
priv = conn->privateData;
virObjectLock(priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册