mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
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:
parent
ada4d9b81f
commit
092e6f2201
@ -17649,7 +17649,11 @@ virDomainDiskByName(virDomainDefPtr def,
|
|||||||
bool allow_ambiguous)
|
bool allow_ambiguous)
|
||||||
{
|
{
|
||||||
int idx = virDomainDiskIndexByName(def, name, 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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user