[PATCH] conf: nodedev: Remove inverted match logic

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

 



Commit c1276177f832 simplified the match logic; this commit
gets rid of the inverted logic to make the code even more
straightforward.
---
 src/conf/node_device_conf.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 0c9c348..b9b9dfa 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -1806,22 +1806,22 @@ virNodeDeviceMatch(virNodeDeviceObjPtr devobj,
 {
     /* filter by cap type */
     if (flags & VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP) {
-        if (!(MATCH(SYSTEM)        ||
-              MATCH(PCI_DEV)       ||
-              MATCH(USB_DEV)       ||
-              MATCH(USB_INTERFACE) ||
-              MATCH(NET)           ||
-              MATCH(SCSI_HOST)     ||
-              MATCH(SCSI_TARGET)   ||
-              MATCH(SCSI)          ||
-              MATCH(STORAGE)       ||
-              MATCH(FC_HOST)       ||
-              MATCH(VPORTS)        ||
-              MATCH(SCSI_GENERIC)))
-            return false;
+        if (MATCH(SYSTEM)        ||
+            MATCH(PCI_DEV)       ||
+            MATCH(USB_DEV)       ||
+            MATCH(USB_INTERFACE) ||
+            MATCH(NET)           ||
+            MATCH(SCSI_HOST)     ||
+            MATCH(SCSI_TARGET)   ||
+            MATCH(SCSI)          ||
+            MATCH(STORAGE)       ||
+            MATCH(FC_HOST)       ||
+            MATCH(VPORTS)        ||
+            MATCH(SCSI_GENERIC))
+            return true;
     }
 
-    return true;
+    return false;
 }
 #undef MATCH
 
-- 
2.5.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]