From 012624217e173e7cc9504cfc1930f9e753f215e7 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Tue, 1 Oct 2019 13:06:24 -0400 Subject: [PATCH] conf: change args/return values of remaining virDomainNetGetActual*() to const 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 Reviewed-by: Cole Robinson --- 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 9bf0dd2aee..6fb08fa4a8 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29462,7 +29462,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; @@ -29475,7 +29475,7 @@ virDomainNetGetActualBridgeName(virDomainNetDefPtr iface) } int -virDomainNetGetActualBridgeMACTableManager(virDomainNetDefPtr iface) +virDomainNetGetActualBridgeMACTableManager(const virDomainNetDef *iface) { if (iface->type == VIR_DOMAIN_NET_TYPE_NETWORK && iface->data.network.actual && @@ -29486,7 +29486,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; @@ -29498,7 +29498,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; @@ -29585,7 +29585,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 8f1040468b..31a791def3 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3208,17 +3208,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); -- GitLab