]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
xencapstest: Resolve Coverity CHECKED_RETURN error
authorJohn Ferlan <jferlan@redhat.com>
Thu, 16 May 2013 12:56:56 +0000 (08:56 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 21 May 2013 13:22:21 +0000 (09:22 -0400)
The return from virInitialize() needs to be checked.

tests/xencapstest.c

index e220234b6afbea0bbff76c282da58e839ad52300..8bdd6cde138d0e4ba0976e0747b085bc790316cd 100644 (file)
@@ -161,7 +161,8 @@ mymain(void)
     int ret = 0;
 
     xenHypervisorInit(&hv_versions);
-    virInitialize();
+    if (virInitialize() < 0)
+        return EXIT_FAILURE;
 
     if (virtTestRun("Capabilities for i686, no PAE, no HVM",
                     1, testXeni686, NULL) != 0)