From ba7e88edf7cf2e0469788c853bb84e1e8a67a81b Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 14 Apr 2015 07:36:23 -0400 Subject: [PATCH] nwfilter: Change 'index' to 'idx' Forthcoming syntax check rule will disallow usage of 'int index', so change it for nwfilter --- 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 e561943d8b..0ac8baa5a8 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 98610a7f71..abd5b85fec 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;