conf: change virNWFilterBindingPtr to virNWFilterBindingDefPtr

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 <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2018-05-08 13:45:26 +01:00
parent aa51063927
commit ce1144960c
3 changed files with 20 additions and 20 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -787,8 +787,8 @@ virDomainNumatuneSpecifiedMaxNode;
# conf/nwfilter_conf.h
virNWFilterBindingCopy;
virNWFilterBindingFree;
virNWFilterBindingDefCopy;
virNWFilterBindingDefFree;
virNWFilterCallbackDriversLock;
virNWFilterCallbackDriversUnlock;
virNWFilterChainSuffixTypeToString;