[PATCH 5/6] Change 'int isTempChain' to bool in nwfilter

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

 



The 'int isTempChain' parameter to various nwfilter methods
only takes two values so should be a bool type.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/nwfilter/nwfilter_ebiptables_driver.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c
index 63ccfe6..0927552 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -674,7 +674,7 @@ static void
 _iptablesRemoveRootChain(virBufferPtr buf,
                          char prefix,
                          bool incoming, const char *ifname,
-                         int isTempChain)
+                         bool isTempChain)
 {
     char chain[MAX_CHAINNAME_LENGTH];
     char chainPrefix[2] = {
@@ -704,7 +704,7 @@ iptablesRemoveRootChain(virBufferPtr buf,
                         bool incoming,
                         const char *ifname)
 {
-    _iptablesRemoveRootChain(buf, prefix, incoming, ifname, 0);
+    _iptablesRemoveRootChain(buf, prefix, incoming, ifname, false);
 }
 
 
@@ -715,7 +715,7 @@ iptablesRemoveTmpRootChain(virBufferPtr buf,
                            const char *ifname)
 {
     _iptablesRemoveRootChain(buf, prefix,
-                             incoming, ifname, 1);
+                             incoming, ifname, true);
 }
 
 
@@ -815,7 +815,7 @@ _iptablesUnlinkRootChain(virBufferPtr buf,
                          const char *basechain,
                          char prefix,
                          bool incoming, const char *ifname,
-                         int isTempChain)
+                         bool isTempChain)
 {
     char chain[MAX_CHAINNAME_LENGTH];
     char chainPrefix[2] = {
@@ -861,7 +861,7 @@ iptablesUnlinkRootChain(virBufferPtr buf,
                         bool incoming, const char *ifname)
 {
     _iptablesUnlinkRootChain(buf,
-                             basechain, prefix, incoming, ifname, 0);
+                             basechain, prefix, incoming, ifname, false);
 }
 
 
@@ -872,7 +872,7 @@ iptablesUnlinkTmpRootChain(virBufferPtr buf,
                            bool incoming, const char *ifname)
 {
     _iptablesUnlinkRootChain(buf,
-                             basechain, prefix, incoming, ifname, 1);
+                             basechain, prefix, incoming, ifname, true);
 }
 
 
@@ -2888,7 +2888,7 @@ ebtablesLinkTmpRootChain(virBufferPtr buf,
 static void
 _ebtablesRemoveRootChain(virBufferPtr buf,
                          bool incoming, const char *ifname,
-                         int isTempChain)
+                         bool isTempChain)
 {
     char chain[MAX_CHAINNAME_LENGTH];
     char chainPrefix;
@@ -2913,7 +2913,7 @@ static void
 ebtablesRemoveRootChain(virBufferPtr buf,
                         bool incoming, const char *ifname)
 {
-    _ebtablesRemoveRootChain(buf, incoming, ifname, 0);
+    _ebtablesRemoveRootChain(buf, incoming, ifname, false);
 }
 
 
@@ -2921,14 +2921,14 @@ static void
 ebtablesRemoveTmpRootChain(virBufferPtr buf,
                            bool incoming, const char *ifname)
 {
-    _ebtablesRemoveRootChain(buf, incoming, ifname, 1);
+    _ebtablesRemoveRootChain(buf, incoming, ifname, true);
 }
 
 
 static void
 _ebtablesUnlinkRootChain(virBufferPtr buf,
                          bool incoming, const char *ifname,
-                         int isTempChain)
+                         bool isTempChain)
 {
     char chain[MAX_CHAINNAME_LENGTH];
     char iodev = incoming ? 'i' : 'o';
@@ -2956,7 +2956,7 @@ static void
 ebtablesUnlinkRootChain(virBufferPtr buf,
                         bool incoming, const char *ifname)
 {
-    _ebtablesUnlinkRootChain(buf, incoming, ifname, 0);
+    _ebtablesUnlinkRootChain(buf, incoming, ifname, false);
 }
 
 
@@ -2964,7 +2964,7 @@ static void
 ebtablesUnlinkTmpRootChain(virBufferPtr buf,
                            bool incoming, const char *ifname)
 {
-    _ebtablesUnlinkRootChain(buf, incoming, ifname, 1);
+    _ebtablesUnlinkRootChain(buf, incoming, ifname, true);
 }
 
 
-- 
1.8.5.3

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