mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
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@redhat.com>
This commit is contained in:
parent
a59cfc0cc3
commit
fff6e7da69
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user