From 810eea719c629338b66d7e348a46155d42f8ffb3 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 11 Jun 2014 11:40:44 +0200 Subject: [PATCH] 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. --- tests/qemuxml2argvtest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.39.5