1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

conf: eliminate virDomainNetDefClear()

This function is no longer used anywhere except virDomainNetDefFree(),
so just inline its contents there.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Laine Stump 2020-09-22 21:33:42 -04:00
parent 5bbf2fa7af
commit 47d622b560
3 changed files with 1 additions and 10 deletions

View File

@ -2491,7 +2491,7 @@ virDomainVsockDefFree(virDomainVsockDefPtr vsock)
void
virDomainNetDefClear(virDomainNetDefPtr def)
virDomainNetDefFree(virDomainNetDefPtr def)
{
if (!def)
return;
@ -2566,14 +2566,7 @@ virDomainNetDefClear(virDomainNetDefPtr def)
virNetDevBandwidthFree(def->bandwidth);
def->bandwidth = NULL;
virNetDevVlanClear(&def->vlan);
}
void
virDomainNetDefFree(virDomainNetDefPtr def)
{
if (!def)
return;
virDomainNetDefClear(def);
virObjectUnref(def->privateData);
VIR_FREE(def);
}

View File

@ -3056,7 +3056,6 @@ void virDomainActualNetDefFree(virDomainActualNetDefPtr def);
virDomainVsockDefPtr virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt);
void virDomainVsockDefFree(virDomainVsockDefPtr vsock);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainVsockDef, virDomainVsockDefFree);
void virDomainNetDefClear(virDomainNetDefPtr def);
void virDomainNetDefFree(virDomainNetDefPtr def);
void virDomainSmartcardDefFree(virDomainSmartcardDefPtr def);
void virDomainChrDefFree(virDomainChrDefPtr def);

View File

@ -507,7 +507,6 @@ virDomainNetARPInterfaces;
virDomainNetBandwidthUpdate;
virDomainNetDefActualFromNetworkPort;
virDomainNetDefActualToNetworkPort;
virDomainNetDefClear;
virDomainNetDefFormat;
virDomainNetDefFree;
virDomainNetDefNew;