[PATCH 2/9] storage: Refactor matchISCSISource

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

 



Continuing on the same reduction them, foobar'd

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/storage_conf.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 4a38416..fa7a7f9 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -2295,13 +2295,12 @@ static bool
 matchISCSISource(virStoragePoolObjPtr matchpool,
                  virStoragePoolDefPtr def)
 {
-    if (matchpool->def->source.nhost == 1 && def->source.nhost == 1) {
-        if (STREQ(matchpool->def->source.hosts[0].name,
-                  def->source.hosts[0].name)) {
-            if ((matchpool->def->source.initiator.iqn) &&
-                (def->source.initiator.iqn)) {
-                if (STREQ(matchpool->def->source.initiator.iqn,
-                          def->source.initiator.iqn))
+    virStoragePoolSourcePtr poolsrc = &matchpool->def->source;
+    virStoragePoolSourcePtr defsrc = &def->source;
+    if (poolsrc->nhost == 1 && defsrc->nhost == 1) {
+        if (STREQ(poolsrc->hosts[0].name, defsrc->hosts[0].name)) {
+            if (poolsrc->initiator.iqn && defsrc->initiator.iqn) {
+                if (STREQ(poolsrc->initiator.iqn, defsrc->initiator.iqn))
                     return true;
                 else
                     return false;
-- 
2.1.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]