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

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



On Wed, Jul 10, 2013 at 04:02:31PM +0800, Guannan Ren wrote:
> 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/network/bridge_driver.c | 281 +++++++++++++++++++++++---------------------
> >  1 file changed, 144 insertions(+), 137 deletions(-)
> >

Squashing in:

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 463b697..a7ff602 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -2795,7 +2795,8 @@ static int networkClose(virConnectPtr conn) {
 }
 
 static int networkConnectNumOfNetworks(virConnectPtr conn) {
-    int nactive = 0, i;
+    int nactive = 0;
+    size_t i;
     struct network_driver *driver = conn->networkPrivateData;
 
     if (virConnectNumOfNetworksEnsureACL(conn) < 0)
@@ -2817,7 +2818,8 @@ static int networkConnectNumOfNetworks(virConnectPtr conn) {
 
 static int networkConnectListNetworks(virConnectPtr conn, char **const names, int nnames) {
     struct network_driver *driver = conn->networkPrivateData;
-    int got = 0, i;
+    int got = 0;
+    size_t i;
 
     if (virConnectListNetworksEnsureACL(conn) < 0)
         return -1;
@@ -2848,7 +2850,8 @@ static int networkConnectListNetworks(virConnectPtr conn, char **const names, in
 }
 
 static int networkConnectNumOfDefinedNetworks(virConnectPtr conn) {
-    int ninactive = 0, i;
+    int ninactive = 0;
+    size_t i;
     struct network_driver *driver = conn->networkPrivateData;
 
     if (virConnectNumOfDefinedNetworksEnsureACL(conn) < 0)
@@ -2870,7 +2873,8 @@ static int networkConnectNumOfDefinedNetworks(virConnectPtr conn) {
 
 static int networkConnectListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) {
     struct network_driver *driver = conn->networkPrivateData;
-    int got = 0, i;
+    int got = 0;
+    size_t i;
 
     if (virConnectListDefinedNetworksEnsureACL(conn) < 0)
         return -1;
@@ -3717,7 +3721,8 @@ networkCreateInterfacePool(virNetworkDefPtr netdef) {
     unsigned int num_virt_fns = 0;
     char **vfname = NULL;
     virPCIDeviceAddressPtr *virt_fns;
-    int ret = -1, i = 0;
+    int ret = -1;
+    size_t i;
 
     if ((virNetDevGetVirtualFunctions(netdef->forward.pfs->dev,
                                       &vfname, &virt_fns, &num_virt_fns)) < 0) {


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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