[PATCH 5/7] conf: change args/return values of remaining virDomainNetGetActual*() to const

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

 



These all just return a scalar value, so there's no daisy-chained
fallout from changing them, and they can easily be combined in a
single patch.

Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 10 +++++-----
 src/conf/domain_conf.h | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index af8c0af7c7..01a1a74946 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -29606,7 +29606,7 @@ virDomainNetGetActualType(const virDomainNetDef *iface)
 }
 
 const char *
-virDomainNetGetActualBridgeName(virDomainNetDefPtr iface)
+virDomainNetGetActualBridgeName(const virDomainNetDef *iface)
 {
     if (iface->type == VIR_DOMAIN_NET_TYPE_BRIDGE)
         return iface->data.bridge.brname;
@@ -29619,7 +29619,7 @@ virDomainNetGetActualBridgeName(virDomainNetDefPtr iface)
 }
 
 int
-virDomainNetGetActualBridgeMACTableManager(virDomainNetDefPtr iface)
+virDomainNetGetActualBridgeMACTableManager(const virDomainNetDef *iface)
 {
     if (iface->type == VIR_DOMAIN_NET_TYPE_NETWORK &&
         iface->data.network.actual &&
@@ -29630,7 +29630,7 @@ virDomainNetGetActualBridgeMACTableManager(virDomainNetDefPtr iface)
 }
 
 const char *
-virDomainNetGetActualDirectDev(virDomainNetDefPtr iface)
+virDomainNetGetActualDirectDev(const virDomainNetDef *iface)
 {
     if (iface->type == VIR_DOMAIN_NET_TYPE_DIRECT)
         return iface->data.direct.linkdev;
@@ -29642,7 +29642,7 @@ virDomainNetGetActualDirectDev(virDomainNetDefPtr iface)
 }
 
 int
-virDomainNetGetActualDirectMode(virDomainNetDefPtr iface)
+virDomainNetGetActualDirectMode(const virDomainNetDef *iface)
 {
     if (iface->type == VIR_DOMAIN_NET_TYPE_DIRECT)
         return iface->data.direct.mode;
@@ -29729,7 +29729,7 @@ virDomainNetGetActualVlan(const virDomainNetDef *iface)
 
 
 bool
-virDomainNetGetActualTrustGuestRxFilters(virDomainNetDefPtr iface)
+virDomainNetGetActualTrustGuestRxFilters(const virDomainNetDef *iface)
 {
     if (iface->type == VIR_DOMAIN_NET_TYPE_NETWORK &&
         iface->data.network.actual)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index b08202b092..4a7010e8a5 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3204,17 +3204,17 @@ int virDomainGraphicsListenAppendSocket(virDomainGraphicsDefPtr def,
             ATTRIBUTE_NONNULL(1);
 
 virDomainNetType virDomainNetGetActualType(const virDomainNetDef *iface);
-const char *virDomainNetGetActualBridgeName(virDomainNetDefPtr iface);
-int virDomainNetGetActualBridgeMACTableManager(virDomainNetDefPtr iface);
-const char *virDomainNetGetActualDirectDev(virDomainNetDefPtr iface);
-int virDomainNetGetActualDirectMode(virDomainNetDefPtr iface);
+const char *virDomainNetGetActualBridgeName(const virDomainNetDef *iface);
+int virDomainNetGetActualBridgeMACTableManager(const virDomainNetDef *iface);
+const char *virDomainNetGetActualDirectDev(const virDomainNetDef *iface);
+int virDomainNetGetActualDirectMode(const virDomainNetDef *iface);
 virDomainHostdevDefPtr virDomainNetGetActualHostdev(virDomainNetDefPtr iface);
 const virNetDevVPortProfile *
 virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface);
 const virNetDevBandwidth *
 virDomainNetGetActualBandwidth(const virDomainNetDef *iface);
 const virNetDevVlan *virDomainNetGetActualVlan(const virDomainNetDef *iface);
-bool virDomainNetGetActualTrustGuestRxFilters(virDomainNetDefPtr iface);
+bool virDomainNetGetActualTrustGuestRxFilters(const virDomainNetDef *iface);
 const char *virDomainNetGetModelString(const virDomainNetDef *net);
 int virDomainNetSetModelString(virDomainNetDefPtr et,
                                const char *model);
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[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