[PATCH 2/3] conf: eliminate virDomainNetDefClear()

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

 



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

Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---
 src/conf/domain_conf.c   | 9 +--------
 src/conf/domain_conf.h   | 1 -
 src/libvirt_private.syms | 1 -
 3 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a91dbd4aa9..df5171301d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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);
 }
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 8f1662aae0..9a44315519 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -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);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 6bcbfa667d..4e66385bab 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -507,7 +507,6 @@ virDomainNetARPInterfaces;
 virDomainNetBandwidthUpdate;
 virDomainNetDefActualFromNetworkPort;
 virDomainNetDefActualToNetworkPort;
-virDomainNetDefClear;
 virDomainNetDefFormat;
 virDomainNetDefFree;
 virDomainNetDefNew;
-- 
2.26.2




[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]

  Powered by Linux