summaryrefslogtreecommitdiff
path: root/tools/virt-login-shell.c
diff options
context:
space:
mode:
authorJohn Ferlan <jferlan@redhat.com>2014-09-12 08:16:07 -0400
committerJohn Ferlan <jferlan@redhat.com>2014-09-15 10:44:27 -0400
commit07334ccbac01c277bb311ea2512cb44400052586 (patch)
treee16763417984e90c77b99b82ad0f266721d14a43 /tools/virt-login-shell.c
parent0268a35db4e585f82668dfeacc2894302801178f (diff)
downloadlibvirt-07334ccbac01c277bb311ea2512cb44400052586.tar.gz
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.
Diffstat (limited to 'tools/virt-login-shell.c')
-rw-r--r--tools/virt-login-shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c
index be15a32c91..ceb271d070 100644
--- a/tools/virt-login-shell.c
+++ b/tools/virt-login-shell.c
@@ -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) {