1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

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.
This commit is contained in:
Peter Krempa 2014-06-11 11:40:44 +02:00
parent b9f8a2f25e
commit 810eea719c

View File

@ -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);
}