[Spice-devel] [RFC PATCH 01/16] OT: small optimization
Frediano Ziglio
fziglio at redhat.com
Wed Jan 25 12:42:24 UTC 2017
---
server/char-device.c | 6 ------
server/char-device.h | 6 +++++-
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/server/char-device.c b/server/char-device.c
index c40ed65..7c86f76 100644
--- a/server/char-device.c
+++ b/server/char-device.c
@@ -976,12 +976,6 @@ SpiceServer* red_char_device_get_server(RedCharDevice *dev)
return dev->priv->reds;
}
-SpiceCharDeviceInterface *spice_char_device_get_interface(SpiceCharDeviceInstance *instance)
-{
- return SPICE_UPCAST(SpiceCharDeviceInterface, instance->base.sif);
-}
-
-
static void red_char_device_init_device_instance(RedCharDevice *self)
{
SpiceCharDeviceInterface *sif;
diff --git a/server/char-device.h b/server/char-device.h
index 3b87023..761ff2b 100644
--- a/server/char-device.h
+++ b/server/char-device.h
@@ -236,6 +236,10 @@ RedCharDevice *spicevmc_device_connect(RedsState *reds,
void spicevmc_device_disconnect(RedsState *reds,
SpiceCharDeviceInstance *char_device);
-SpiceCharDeviceInterface *spice_char_device_get_interface(SpiceCharDeviceInstance *instance);
+static inline SpiceCharDeviceInterface *
+spice_char_device_get_interface(SpiceCharDeviceInstance *instance)
+{
+ return SPICE_UPCAST(SpiceCharDeviceInterface, instance->base.sif);
+}
#endif // CHAR_DEVICE_H_
--
git-series 0.9.1
More information about the Spice-devel
mailing list