From: Peter Krempa Date: Wed, 11 Jun 2014 09:40:44 +0000 (+0200) Subject: uuid: Fix coverity warning of unchecked return value X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=810eea719c629338b66d7e348a46155d42f8ffb3;p=libvirt.git uuid: Fix coverity warning of unchecked return value Coverity checks for patterns of handling return values of functions. Some recent addition must have tripped a threshold where coverity now complains that we usually check the return value of virUUIDGenerate but don't do it in one place. Add a check to make coverity happy. --- diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 24d104e2c0..d8782d8d84 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -51,7 +51,9 @@ fakeSecretLookupByUsage(virConnectPtr conn, if (STRNEQ(usageID, "mycluster_myname")) return NULL; - virUUIDGenerate(uuid); + if (virUUIDGenerate(uuid) < 0) + return NULL; + return virGetSecret(conn, uuid, usageType, usageID); }