[Pcsclite-cvs-commit] r4616 - /trunk/PCSC/src/atrhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Dec 15 13:32:27 UTC 2009


Author: rousseau
Date: Tue Dec 15 13:32:26 2009
New Revision: 4616

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4616
Log:
ATRDecodeAtr(): reformat

Modified:
    trunk/PCSC/src/atrhandler.c

Modified: trunk/PCSC/src/atrhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/atrhandler.c?rev=4616&op=diff
==============================================================================
--- trunk/PCSC/src/atrhandler.c (original)
+++ trunk/PCSC/src/atrhandler.c Tue Dec 15 13:32:26 2009
@@ -176,34 +176,35 @@
 						 * supported at this time
 						 */
 					}
-		} else
+		}
+		else
 			Y1i = 0;
 
-			/* test presence of TA2 */
-			if ((2 == i) && (TAi >= 0))
+		/* test presence of TA2 */
+		if ((2 == i) && (TAi >= 0))
+		{
+			T = TAi & 0x0F;
+#ifdef ATR_DEBUG
+			Log2(PCSC_LOG_DEBUG, "Specific mode: T=%d", T);
+#endif
+			switch (T)
 			{
-				T = TAi & 0x0F;
-#ifdef ATR_DEBUG
-				Log2(PCSC_LOG_DEBUG, "Specific mode: T=%d", T);
-#endif
-				switch (T)
-				{
-					case 0:
-						psExtension->CardCapabilities.CurrentProtocol =
-							psExtension->CardCapabilities.AvailableProtocols =
-							SCARD_PROTOCOL_T0;
-						break;
-
-					case 1:
-						psExtension->CardCapabilities.CurrentProtocol =
-							psExtension->CardCapabilities.AvailableProtocols =
-							SCARD_PROTOCOL_T1;
-						break;
-
-					default:
-						return 0; /** @retval 0 Unable do decode T protocol */
-				}
+				case 0:
+					psExtension->CardCapabilities.CurrentProtocol =
+						psExtension->CardCapabilities.AvailableProtocols =
+						SCARD_PROTOCOL_T0;
+					break;
+
+				case 1:
+					psExtension->CardCapabilities.CurrentProtocol =
+						psExtension->CardCapabilities.AvailableProtocols =
+						SCARD_PROTOCOL_T1;
+					break;
+
+				default:
+					return 0; /** @retval 0 Unable do decode T protocol */
 			}
+		}
 
 		if (p > MAX_ATR_SIZE)
 		{




More information about the Pcsclite-cvs-commit mailing list