[Pcsclite-git-commit] [PCSC] 07/16: SCardLockThread() and SCardUnlockThread() returns void now

Ludovic Rousseau rousseau at moszumanska.debian.org
Thu May 11 16:26:04 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 a1a7ca2803f0f87dc2371eaf2572abc7795fd98a
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu May 11 14:47:44 2017 +0200

    SCardLockThread() and SCardUnlockThread() returns void now
    
    The value returned by SCardLockThread() and SCardUnlockThread() was
    ignored.
    Now the SCardLockThread() and SCardUnlockThread() functions returns
    void.
---
 src/winscard_clnt.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/winscard_clnt.c b/src/winscard_clnt.c
index 1c3e600..d6b40fc 100644
--- a/src/winscard_clnt.c
+++ b/src/winscard_clnt.c
@@ -398,9 +398,9 @@ static LONG getReaderStates(SCONTEXTMAP * currentContextMap);
  *
  * Wrapper to the function pthread_mutex_lock().
  */
-inline static LONG SCardLockThread(void)
+inline static void SCardLockThread(void)
 {
-	return pthread_mutex_lock(&clientMutex);
+	pthread_mutex_lock(&clientMutex);
 }
 
 /**
@@ -408,9 +408,9 @@ inline static LONG SCardLockThread(void)
  *
  * Wrapper to the function pthread_mutex_unlock().
  */
-inline static LONG SCardUnlockThread(void)
+inline static void SCardUnlockThread(void)
 {
-	return pthread_mutex_unlock(&clientMutex);
+	pthread_mutex_unlock(&clientMutex);
 }
 
 /**
@@ -426,9 +426,9 @@ static int SCardGetContextValidity(SCARDCONTEXT hContext)
 {
 	SCONTEXTMAP * currentContextMap;
 
-	(void)SCardLockThread();
+	SCardLockThread();
 	currentContextMap = SCardGetContextTH(hContext);
-	(void)SCardUnlockThread();
+	SCardUnlockThread();
 
 	return currentContextMap != NULL;
 }
@@ -484,10 +484,10 @@ LONG SCardEstablishContext(DWORD dwScope, LPCVOID pvReserved1,
 	if (rv != SCARD_S_SUCCESS)
 		goto end;
 
-	(void)SCardLockThread();
+	SCardLockThread();
 	rv = SCardEstablishContextTH(dwScope, pvReserved1,
 		pvReserved2, phContext);
-	(void)SCardUnlockThread();
+	SCardUnlockThread();
 
 end:
 	PROFILE_END(rv)
@@ -720,9 +720,9 @@ end:
 	/*
 	 * Remove the local context from the stack
 	 */
-	(void)SCardLockThread();
+	SCardLockThread();
 	(void)SCardRemoveContext(hContext);
-	(void)SCardUnlockThread();
+	SCardUnlockThread();
 
 error:
 	PROFILE_END(rv)
@@ -3292,14 +3292,14 @@ static SCONTEXTMAP * SCardGetAndLockContext(SCARDCONTEXT hContext)
 {
 	SCONTEXTMAP * currentContextMap;
 
-	(void)SCardLockThread();
+	SCardLockThread();
 	currentContextMap = SCardGetContextTH(hContext);
 
 	/* lock the context (if available) */
 	if (NULL != currentContextMap)
 		(void)pthread_mutex_lock(&currentContextMap->mMutex);
 
-	(void)SCardUnlockThread();
+	SCardUnlockThread();
 
 	return currentContextMap;
 }
@@ -3448,14 +3448,14 @@ static LONG SCardGetContextChannelAndLockFromHandle(SCARDHANDLE hCard,
 	if (0 == hCard)
 		return -1;
 
-	(void)SCardLockThread();
+	SCardLockThread();
 	rv = SCardGetContextAndChannelFromHandleTH(hCard, targetContextMap,
 		targetChannelMap);
 
 	if (SCARD_S_SUCCESS == rv)
 		(void)pthread_mutex_lock(&(*targetContextMap)->mMutex);
 
-	(void)SCardUnlockThread();
+	SCardUnlockThread();
 
 	return rv;
 }

-- 
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