[PATCH 4/5] nwfilter: Change 'index' to 'idx'

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

 



Forthcoming syntax check rule will disallow usage of 'int index', so
change it for nwfilter

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/nwfilter_params.c | 8 ++++----
 src/conf/nwfilter_params.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c
index e561943..0ac8baa 100644
--- a/src/conf/nwfilter_params.c
+++ b/src/conf/nwfilter_params.c
@@ -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
diff --git a/src/conf/nwfilter_params.h b/src/conf/nwfilter_params.h
index 98610a7..abd5b85 100644
--- a/src/conf/nwfilter_params.h
+++ b/src/conf/nwfilter_params.h
@@ -111,7 +111,7 @@ struct  _virNWFilterVarAccess {
     virNWFilterVarAccessType accessType;
     union {
         struct {
-            unsigned int index;
+            unsigned int idx;
             unsigned int intIterId;
         } index;
         unsigned int iterId;
-- 
2.1.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]