The function returns NULL if vheader->type is VSC_Init so no need to check it a second time. Signed-off-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> --- server/smartcard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/smartcard.c b/server/smartcard.c index 21dc8de5a..39ada9c28 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -207,7 +207,7 @@ RedMsgItem *smartcard_char_device_on_message_from_device(RedCharDeviceSmartcard break; } /* We pass any VSC_Error right now - might need to ignore some? */ - if (dev->priv->reader_id == VSCARD_UNDEFINED_READER_ID && vheader->type != VSC_Init) { + if (dev->priv->reader_id == VSCARD_UNDEFINED_READER_ID) { red_channel_warning(red_channel_client_get_channel(RED_CHANNEL_CLIENT(dev->priv->scc)), "error: reader_id not assigned for message of type %d", vheader->type); -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel