[Pcsclite-git-commit] [PCSC] 02/02: RFAddReader(): simplify code

Ludovic Rousseau rousseau at moszumanska.debian.org
Mon Aug 21 15:48:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository PCSC.

commit 1324532eee4342aa17ad16617c8d6ae03b3e4b96
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Mon Aug 21 13:13:08 2017 +0200

    RFAddReader(): simplify code
    
    The cases rv != IFD_SUCCESS and dwGetSize != 1 are already managed by
    the previous if(). So no need to test again these values.
---
 src/readerfactory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/readerfactory.c b/src/readerfactory.c
index 3e2fdb6..e42cdc9 100644
--- a/src/readerfactory.c
+++ b/src/readerfactory.c
@@ -416,8 +416,8 @@ LONG RFAddReader(const char *readerNameLong, int port, const char *library,
 		 * reader so we can just return SCARD_S_SUCCESS. */
 		return SCARD_S_SUCCESS;
 
-	if (rv == IFD_SUCCESS && dwGetSize == 1 && nbSlots == 1)
-		/* Reader has this defined and it only has one slot */
+	if (1 == nbSlots)
+		/* Reader has only one slot */
 		return SCARD_S_SUCCESS;
 
 	/*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list