[PATCH 6/7] virNetworkDefForwardIf: drop inline

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

 



In file included from network/bridge_driver_platform.h:30:0,
                 from network/bridge_driver_platform.c:26:
network/bridge_driver_linux.c: In function 'networkRemoveRoutingFirewallRules':
./conf/network_conf.h:350:1: error: inlining failed in call to 'virNetworkDefForwardIf.constprop': call is unlikely and code size would grow [-Werror=inline]
 virNetworkDefForwardIf(const virNetworkDef *def, size_t n)
 ^
Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/conf/network_conf.c  | 8 ++++++++
 src/conf/network_conf.h  | 8 +-------
 src/libvirt_private.syms | 1 +
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 6300178..4fb2e2a 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -2925,6 +2925,14 @@ virNetworkObjFormat(virNetworkObjPtr net,
     return NULL;
 }
 
+const char *
+virNetworkDefForwardIf(const virNetworkDef *def, size_t n)
+{
+    return ((def->forward.ifs && (def->forward.nifs > n) &&
+             def->forward.ifs[n].type == VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_NETDEV)
+            ? def->forward.ifs[n].device.dev : NULL);
+}
+
 virPortGroupDefPtr virPortGroupFindByName(virNetworkDefPtr net,
                                           const char *portgroup)
 {
diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
index 1cd5100..b72257b 100644
--- a/src/conf/network_conf.h
+++ b/src/conf/network_conf.h
@@ -346,13 +346,7 @@ int virNetworkDefFormatBuf(virBufferPtr buf,
                            const virNetworkDef *def,
                            unsigned int flags);
 
-static inline const char *
-virNetworkDefForwardIf(const virNetworkDef *def, size_t n)
-{
-    return ((def->forward.ifs && (def->forward.nifs > n) &&
-             def->forward.ifs[n].type == VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_NETDEV)
-            ? def->forward.ifs[n].device.dev : NULL);
-}
+const char * virNetworkDefForwardIf(const virNetworkDef *def, size_t n);
 
 virPortGroupDefPtr virPortGroupFindByName(virNetworkDefPtr net,
                                           const char *portgroup);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 5251dc0..3a1b9e1 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -589,6 +589,7 @@ virNetworkConfigFile;
 virNetworkDefCopy;
 virNetworkDefFormat;
 virNetworkDefFormatBuf;
+virNetworkDefForwardIf;
 virNetworkDefFree;
 virNetworkDefGetIpByIndex;
 virNetworkDefGetRouteByIndex;
-- 
2.4.10

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