[Spice-commits] server/smartcard.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Mar 13 10:50:07 UTC 2020
server/smartcard.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit fff6e7da690af07fd23ef2388be9c86e4b2ca78b
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Mon Mar 9 21:19:05 2020 +0000
smartcard: Avoid useless cast
We just created the object, we know is a RedCharDeviceSmartcard,
avoid to cast the pointer using RED_CHAR_DEVICE_SMARTCARD.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/smartcard.c b/server/smartcard.c
index 74c99062..b2896047 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -255,16 +255,16 @@ SpiceCharDeviceInstance *smartcard_readers_get_unattached(void)
static RedCharDeviceSmartcard *smartcard_device_new(RedsState *reds, SpiceCharDeviceInstance *sin)
{
- RedCharDevice *char_dev;
+ RedCharDeviceSmartcard *dev;
- char_dev = g_object_new(RED_TYPE_CHAR_DEVICE_SMARTCARD,
- "sin", sin,
- "spice-server", reds,
- "client-tokens-interval", 0ULL,
- "self-tokens", ~0ULL,
- NULL);
+ dev = g_object_new(RED_TYPE_CHAR_DEVICE_SMARTCARD,
+ "sin", sin,
+ "spice-server", reds,
+ "client-tokens-interval", 0ULL,
+ "self-tokens", ~0ULL,
+ NULL);
- return RED_CHAR_DEVICE_SMARTCARD(char_dev);
+ return dev;
}
void smartcard_device_disconnect(SpiceCharDeviceInstance *char_device)
More information about the Spice-commits
mailing list