virDomainDiskByName: Remove ternary operator

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-12-01 17:54:41 +01:00
parent ada4d9b81f
commit 092e6f2201

View File

@ -17649,7 +17649,11 @@ virDomainDiskByName(virDomainDefPtr def,
bool allow_ambiguous)
{
int idx = virDomainDiskIndexByName(def, name, allow_ambiguous);
return idx < 0 ? NULL : def->disks[idx];
if (idx < 0)
return NULL;
return def->disks[idx];
}