]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
nwfilter: Change 'index' to 'idx'
authorJohn Ferlan <jferlan@redhat.com>
Tue, 14 Apr 2015 11:36:23 +0000 (07:36 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 14 Apr 2015 15:18:28 +0000 (11:18 -0400)
Forthcoming syntax check rule will disallow usage of 'int index', so
change it for nwfilter

src/conf/nwfilter_params.c
src/conf/nwfilter_params.h

index e561943d8b8484453f44085e4e23c918b43be8d6..0ac8baa5a8312ba899b79ffe999efe1ca28172d8 100644 (file)
@@ -931,7 +931,7 @@ virNWFilterVarAccessEqual(const virNWFilterVarAccess *a,
 
     switch (a->accessType) {
     case VIR_NWFILTER_VAR_ACCESS_ELEMENT:
-        return (a->u.index.index == b->u.index.index &&
+        return (a->u.index.idx == b->u.index.idx &&
                 a->u.index.intIterId == b->u.index.intIterId);
         break;
     case VIR_NWFILTER_VAR_ACCESS_ITERATOR:
@@ -1010,7 +1010,7 @@ virNWFilterVarAccessParse(const char *varAccess)
 
         switch (dest->accessType) {
         case VIR_NWFILTER_VAR_ACCESS_ELEMENT:
-            dest->u.index.index = result;
+            dest->u.index.idx = result;
             dest->u.index.intIterId = ~0;
             break;
         case VIR_NWFILTER_VAR_ACCESS_ITERATOR:
@@ -1044,7 +1044,7 @@ virNWFilterVarAccessPrint(virNWFilterVarAccessPtr vap, virBufferPtr buf)
     virBufferAdd(buf, vap->varName, -1);
     switch (vap->accessType) {
     case VIR_NWFILTER_VAR_ACCESS_ELEMENT:
-        virBufferAsprintf(buf, "[%u]", vap->u.index.index);
+        virBufferAsprintf(buf, "[%u]", vap->u.index.idx);
         break;
     case VIR_NWFILTER_VAR_ACCESS_ITERATOR:
         if (vap->u.iterId != 0)
@@ -1076,7 +1076,7 @@ virNWFilterVarAccessGetIterId(const virNWFilterVarAccess *vap)
 unsigned int
 virNWFilterVarAccessGetIndex(const virNWFilterVarAccess *vap)
 {
-    return vap->u.index.index;
+    return vap->u.index.idx;
 }
 
 static void
index 98610a7f719da6c28b0430461799954cf339ab3b..abd5b85fece3762879513c35fecc51b86d4af660 100644 (file)
@@ -111,7 +111,7 @@ struct  _virNWFilterVarAccess {
     virNWFilterVarAccessType accessType;
     union {
         struct {
-            unsigned int index;
+            unsigned int idx;
             unsigned int intIterId;
         } index;
         unsigned int iterId;