[PATCH 09/11] virDomainDiskByName: Remove ternary operator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 49b68c2c68..6922ebf407 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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];
 }


-- 
2.28.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux