From ce1144960cdb903271ef660020ff6c5f2eb4978e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 8 May 2018 13:45:26 +0100 Subject: [PATCH] conf: change virNWFilterBindingPtr to virNWFilterBindingDefPtr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are going to want to expose the NWFilter binding concept in the public API, so the virNWFilterBindingPtr type needs to be used there. Our internal type will shortly gain an XML representation, so rename it to virNWFilterBindingDefPtr which follows our normal conventions. Reviewed-by: John Ferlan Signed-off-by: Daniel P. Berrangé --- src/conf/nwfilter_conf.c | 24 ++++++++++++------------ src/conf/nwfilter_conf.h | 12 ++++++------ src/libvirt_private.syms | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 452daa214a..6422f6b8ea 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -3268,25 +3268,25 @@ virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule) void -virNWFilterBindingFree(virNWFilterBindingPtr binding) +virNWFilterBindingDefFree(virNWFilterBindingDefPtr def) { - if (!binding) + if (!def) return; - VIR_FREE(binding->ownername); - VIR_FREE(binding->portdevname); - VIR_FREE(binding->linkdevname); - VIR_FREE(binding->filter); - virHashFree(binding->filterparams); + VIR_FREE(def->ownername); + VIR_FREE(def->portdevname); + VIR_FREE(def->linkdevname); + VIR_FREE(def->filter); + virHashFree(def->filterparams); - VIR_FREE(binding); + VIR_FREE(def); } -virNWFilterBindingPtr -virNWFilterBindingCopy(virNWFilterBindingPtr src) +virNWFilterBindingDefPtr +virNWFilterBindingDefCopy(virNWFilterBindingDefPtr src) { - virNWFilterBindingPtr ret; + virNWFilterBindingDefPtr ret; if (VIR_ALLOC(ret) < 0) return NULL; @@ -3316,6 +3316,6 @@ virNWFilterBindingCopy(virNWFilterBindingPtr src) return ret; error: - virNWFilterBindingFree(ret); + virNWFilterBindingDefFree(ret); return NULL; } diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 6fcbba4bd5..c72171f2f2 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -545,10 +545,10 @@ struct _virNWFilterDef { virNWFilterEntryPtr *filterEntries; }; -typedef struct virNWFilterBinding virNWFilterBinding; -typedef virNWFilterBinding *virNWFilterBindingPtr; +typedef struct _virNWFilterBindingDef virNWFilterBindingDef; +typedef virNWFilterBindingDef *virNWFilterBindingDefPtr; -struct virNWFilterBinding { +struct _virNWFilterBindingDef { char *ownername; unsigned char owneruuid[VIR_UUID_BUFLEN]; char *portdevname; @@ -664,9 +664,9 @@ bool virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule); void -virNWFilterBindingFree(virNWFilterBindingPtr binding); -virNWFilterBindingPtr -virNWFilterBindingCopy(virNWFilterBindingPtr src); +virNWFilterBindingDefFree(virNWFilterBindingDefPtr binding); +virNWFilterBindingDefPtr +virNWFilterBindingDefCopy(virNWFilterBindingDefPtr src); VIR_ENUM_DECL(virNWFilterRuleAction); VIR_ENUM_DECL(virNWFilterRuleDirection); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 98913a577a..91b6235328 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -787,8 +787,8 @@ virDomainNumatuneSpecifiedMaxNode; # conf/nwfilter_conf.h -virNWFilterBindingCopy; -virNWFilterBindingFree; +virNWFilterBindingDefCopy; +virNWFilterBindingDefFree; virNWFilterCallbackDriversLock; virNWFilterCallbackDriversUnlock; virNWFilterChainSuffixTypeToString; -- GitLab