From 44836fb55dc4680385d43c7b41b3039b94e72a58 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Fri, 8 Feb 2019 17:26:25 +0100 Subject: [PATCH] smartcard: Remove redundant test in smartcard_char_device_on_message_from_device() The function returns NULL if vheader->type is VSC_Init so no need to check it a second time. Signed-off-by: Christophe Fergeau Acked-by: Frediano Ziglio --- server/smartcard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/smartcard.c b/server/smartcard.c index 21dc8de5..39ada9c2 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);