[Pcsclite-cvs-commit] r3071 - /trunk/PCSC/src/winscard_clnt.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Wed Jul 30 14:07:44 UTC 2008
Author: rousseau
Date: Wed Jul 30 14:07:44 2008
New Revision: 3071
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3071
Log:
SCardStatus(): factorize code using goto end;
Modified:
trunk/PCSC/src/winscard_clnt.c
Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=3071&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Wed Jul 30 14:07:44 2008
@@ -1556,8 +1556,8 @@
if (i == PCSCLITE_MAX_READERS_CONTEXTS)
{
- SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
- return SCARD_E_READER_UNAVAILABLE;
+ rv = SCARD_E_READER_UNAVAILABLE;
+ goto end;
}
/* initialise the structure */
@@ -1574,8 +1574,8 @@
if (rv == -1)
{
- SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
- return SCARD_E_NO_SERVICE;
+ rv = SCARD_E_NO_SERVICE;
+ goto end;
}
/*
@@ -1588,8 +1588,8 @@
if (rv == -1)
{
- SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
- return SCARD_F_COMM_ERROR;
+ rv = SCARD_F_COMM_ERROR;
+ goto end;
}
rv = scStatusStruct.rv;
@@ -1598,8 +1598,7 @@
/*
* An event must have occurred
*/
- SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
- return rv;
+ goto end;
}
/*
More information about the Pcsclite-cvs-commit
mailing list