[Pcsclite-cvs-commit] r6624 - /trunk/Drivers/ccid/src/ifdhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Wed May 8 11:45:06 UTC 2013


Author: rousseau
Date: Wed May  8 11:45:06 2013
New Revision: 6624

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6624
Log:
CreateChannelByNameOrChannel(): fix clang warning

ifdhandler.c:142:26: warning: comparison of constant 617 with expression of type 'status_t' is always false [-Wtautological-constant-out-of-range-compare]
                if (IFD_NO_SUCH_DEVICE == ret)
                    ~~~~~~~~~~~~~~~~~~ ^  ~~~

Do not mix ret of type status_t with CmdGetSlotStatus() returning a RESPONSECODE

Modified:
    trunk/Drivers/ccid/src/ifdhandler.c

Modified: trunk/Drivers/ccid/src/ifdhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ifdhandler.c?rev=6624&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Wed May  8 11:45:06 2013
@@ -126,6 +126,7 @@
 	{
 		unsigned char pcbuffer[SIZE_GET_SLOT_STATUS];
 		unsigned int oldReadTimeout;
+		RESPONSECODE cmd_ret;
 		_ccid_descriptor *ccid_descriptor = get_ccid_descriptor(reader_index);
 
 		/* Maybe we have a special treatment for this reader */
@@ -138,9 +139,9 @@
 		 * few tries. It is an empirical hack */
 
 		/* The reader may have to start here so give it some time */
-		ret = CmdGetSlotStatus(reader_index, pcbuffer);
-		if (IFD_NO_SUCH_DEVICE == ret)
-			return ret;
+		cmd_ret = CmdGetSlotStatus(reader_index, pcbuffer);
+		if (IFD_NO_SUCH_DEVICE == cmd_ret)
+			return cmd_ret;
 
 		/* save the current read timeout computed from card capabilities */
 		oldReadTimeout = ccid_descriptor->readTimeout;




More information about the Pcsclite-cvs-commit mailing list