[Pcsclite-cvs-commit] r6374 - /trunk/PCSC/src/winscard.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Jun 29 09:32:36 UTC 2012
Author: rousseau
Date: Fri Jun 29 09:32:36 2012
New Revision: 6374
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6374
Log:
SCardStatus(): use an exit block
goto exit; instead of a direct return rv;
This will allow to factorize exit code.
Modified:
trunk/PCSC/src/winscard.c
Modified: trunk/PCSC/src/winscard.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard.c?rev=6374&op=diff
==============================================================================
--- trunk/PCSC/src/winscard.c (original)
+++ trunk/PCSC/src/winscard.c Fri Jun 29 09:32:36 2012
@@ -1243,10 +1243,13 @@
*/
rv = RFCheckSharing(hCard, rContext);
if (rv != SCARD_S_SUCCESS)
- return rv;
+ goto exit;
if (rContext->readerState->cardAtrLength > MAX_ATR_SIZE)
- return SCARD_F_INTERNAL_ERROR;
+ {
+ rv = SCARD_F_INTERNAL_ERROR;
+ goto exit;
+ }
/*
* This is a client side function however the server maintains the
@@ -1259,15 +1262,16 @@
*/
rv = RFCheckReaderEventState(rContext, hCard);
if (rv != SCARD_S_SUCCESS)
- return rv;
+ goto exit;
/*
* Make sure the reader is working properly
*/
rv = RFCheckReaderStatus(rContext);
if (rv != SCARD_S_SUCCESS)
- return rv;
-
+ goto exit;
+
+exit:
return rv;
}
More information about the Pcsclite-cvs-commit
mailing list