提交 07334ccb 编写于 作者: J John Ferlan

Resolve Coverity CHECKED_RETURN

Coverity complained that checking the return of virDomainCreate()
was not consistent amongst the callers - so added the return check
to the objecteventtest.c and adjust the virt-login-shell to compare
< 0 rather than just non zero for the failure condition.
上级 0268a35d
......@@ -359,7 +359,8 @@ testDomainStartStopEvent(const void *data)
/* Test domain is started */
virDomainDestroy(dom);
virDomainCreate(dom);
if (virDomainCreate(dom) < 0)
goto cleanup;
if (virEventRunDefaultImpl() < 0)
goto cleanup;
......
......@@ -275,7 +275,7 @@ main(int argc, char **argv)
if (!dom)
goto cleanup;
if (!virDomainIsActive(dom) && virDomainCreate(dom)) {
if (!virDomainIsActive(dom) && virDomainCreate(dom) < 0) {
virErrorPtr last_error;
last_error = virGetLastError();
if (last_error->code != VIR_ERR_OPERATION_INVALID) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册