[libvirt] [PATCH 2/3] xencapstest: Resolve Coverity CHECKED_RETURN error
Eric Blake
eblake at redhat.com
Thu May 16 14:20:37 UTC 2013
On 05/16/2013 08:01 AM, John Ferlan wrote:
> The return from virInitialize() needs to be checked.
> ---
> tests/xencapstest.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
ACK.
>
> diff --git a/tests/xencapstest.c b/tests/xencapstest.c
> index e220234..8bdd6cd 100644
> --- a/tests/xencapstest.c
> +++ b/tests/xencapstest.c
> @@ -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)
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130516/1e1a8d4b/attachment-0001.sig>
More information about the libvir-list
mailing list