[Pcsclite-git-commit] [PCSC] 11/16: SCardRemoveContext() 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 a7e8bd92ebea20c7b284aa7b9e600cd1ceb958c0
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu May 11 14:56:48 2017 +0200

    SCardRemoveContext() returns void now
    
    The value returned by SCardRemoveContext() was ignored.
    Now the SCardRemoveContext() function returns void.
---
 src/winscard_clnt.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/winscard_clnt.c b/src/winscard_clnt.c
index 7666122..b5dce04 100644
--- a/src/winscard_clnt.c
+++ b/src/winscard_clnt.c
@@ -374,7 +374,7 @@ PCSC_API const SCARD_IO_REQUEST g_rgSCardRawPci = { SCARD_PROTOCOL_RAW, sizeof(S
 static LONG SCardAddContext(SCARDCONTEXT, DWORD);
 static SCONTEXTMAP * SCardGetAndLockContext(SCARDCONTEXT);
 static SCONTEXTMAP * SCardGetContextTH(SCARDCONTEXT);
-static LONG SCardRemoveContext(SCARDCONTEXT);
+static void SCardRemoveContext(SCARDCONTEXT);
 static LONG SCardCleanContext(SCONTEXTMAP *);
 
 static LONG SCardAddHandle(SCARDHANDLE, SCONTEXTMAP *, LPCSTR);
@@ -721,7 +721,7 @@ end:
 	 * Remove the local context from the stack
 	 */
 	SCardLockThread();
-	(void)SCardRemoveContext(hContext);
+	SCardRemoveContext(hContext);
 	SCardUnlockThread();
 
 error:
@@ -3330,15 +3330,13 @@ static SCONTEXTMAP * SCardGetContextTH(SCARDCONTEXT hContext)
  * @retval SCARD_S_SUCCESS Success (\ref SCARD_S_SUCCESS)
  * @retval SCARD_E_INVALID_HANDLE The context \p hContext was not found (\ref SCARD_E_INVALID_HANDLE)
  */
-static LONG SCardRemoveContext(SCARDCONTEXT hContext)
+static void SCardRemoveContext(SCARDCONTEXT hContext)
 {
 	SCONTEXTMAP * currentContextMap;
 	currentContextMap = SCardGetContextTH(hContext);
 
-	if (NULL == currentContextMap)
-		return SCARD_E_INVALID_HANDLE;
-	else
-		return SCardCleanContext(currentContextMap);
+	if (NULL != currentContextMap)
+		SCardCleanContext(currentContextMap);
 }
 
 static LONG SCardCleanContext(SCONTEXTMAP * targetContextMap)

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