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:
parent
b9f8a2f25e
commit
810eea719c
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user