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

Re: [libvirt] [PATCH 20/32] Convert 'int i' to 'size_t i' in src/nwfilter/ files



On 07/08/2013 10:21 PM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange redhat com>

Convert the type of loop iterators named 'i', 'j', k',
'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or
'unsigned int', also santizing 'ii', 'jj', 'kk' to use
the normal 'i', 'j', 'k' naming

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
  src/nwfilter/nwfilter_driver.c            |  5 +++--
  src/nwfilter/nwfilter_ebiptables_driver.c |  4 ++--
  src/nwfilter/nwfilter_gentech_driver.c    | 21 +++++++++++----------
  3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 0fbc940..57f1f54 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -441,7 +441,8 @@ nwfilterClose(virConnectPtr conn) {
  static int
  nwfilterConnectNumOfNWFilters(virConnectPtr conn) {
      virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
-    int i, n;
+    size_t i;
+    int n;
if (virConnectNumOfNWFiltersEnsureACL(conn) < 0)
          return -1;
@@ -503,7 +504,7 @@ nwfilterConnectListAllNWFilters(virConnectPtr conn,
      int nfilters = 0;
      virNWFilterPtr filter = NULL;
      virNWFilterObjPtr obj = NULL;
-    int i;
+    size_t i;
      int ret = -1;
virCheckFlags(0, -1);

missed i in nwfilterConnectListNWFilters()

diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c
index 9a54de4..ee676b7 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -3705,7 +3705,7 @@ ebiptablesApplyNewRules(const char *ifname,
                          int nruleInstances,
                          void **_inst)
  {
-    int i, j;
+    size_t i, j;
      int cli_status;
      ebiptablesRuleInstPtr *inst = (ebiptablesRuleInstPtr *)_inst;
      virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -4078,7 +4078,7 @@ ebiptablesRemoveRules(const char *ifname ATTRIBUTE_UNUSED,
  {
      int rc = 0;
      int cli_status;
-    int i;
+    size_t i;
      virBuffer buf = VIR_BUFFER_INITIALIZER;
      ebiptablesRuleInstPtr *inst = (ebiptablesRuleInstPtr *)_inst;

missed i in _ebtablesRemoveSubChains()
                 ebtablesRenameTmpSubAndRootChains()
                 ebtablesCreateTmpRootAndSubChains()



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