[Pcsclite-git-commit] [PCSC] 13/16: Remove useless RFDestroyReaderHandle()

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 f65dcd88221e07a9d18b4d8856bf266b1bb2459e
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu May 11 15:00:31 2017 +0200

    Remove useless RFDestroyReaderHandle()
    
    The function RFDestroyReaderHandle() does nothing. So just remove it.
---
 src/readerfactory.c | 6 ------
 src/readerfactory.h | 1 -
 src/winscard.c      | 3 ---
 3 files changed, 10 deletions(-)

diff --git a/src/readerfactory.c b/src/readerfactory.c
index 7ae33cd..fd93e70 100644
--- a/src/readerfactory.c
+++ b/src/readerfactory.c
@@ -1176,12 +1176,6 @@ SCARDHANDLE RFCreateReaderHandle(READER_CONTEXT * rContext)
 	return randHandle;
 }
 
-LONG RFDestroyReaderHandle(/*@unused@*/ SCARDHANDLE hCard)
-{
-	(void)hCard;
-	return SCARD_S_SUCCESS;
-}
-
 LONG RFAddReaderHandle(READER_CONTEXT * rContext, SCARDHANDLE hCard)
 {
 	int listLength, lrv;
diff --git a/src/readerfactory.h b/src/readerfactory.h
index d83ce58..144dd59 100644
--- a/src/readerfactory.h
+++ b/src/readerfactory.h
@@ -163,7 +163,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 	LONG RFInitializeReader(READER_CONTEXT *);
 	void RFUnInitializeReader(READER_CONTEXT *);
 	SCARDHANDLE RFCreateReaderHandle(READER_CONTEXT *);
-	LONG RFDestroyReaderHandle(SCARDHANDLE hCard);
 	LONG RFAddReaderHandle(READER_CONTEXT *, SCARDHANDLE);
 	LONG RFRemoveReaderHandle(READER_CONTEXT *, SCARDHANDLE);
 	void RFSetReaderEventState(READER_CONTEXT *, DWORD);
diff --git a/src/winscard.c b/src/winscard.c
index a08dac3..06bc377 100644
--- a/src/winscard.c
+++ b/src/winscard.c
@@ -471,7 +471,6 @@ LONG SCardConnect(/*@unused@*/ SCARDCONTEXT hContext, LPCSTR szReader,
 		}
 		else
 		{
-			(void)RFDestroyReaderHandle(*phCard);
 			*phCard = 0;
 			rv = SCARD_E_SHARING_VIOLATION;
 			(void)pthread_mutex_unlock(&LockMutex);
@@ -498,7 +497,6 @@ LONG SCardConnect(/*@unused@*/ SCARDCONTEXT hContext, LPCSTR szReader,
 		/*
 		 * Clean up - there is no more room
 		 */
-		(void)RFDestroyReaderHandle(*phCard);
 		if (rContext->contexts == PCSCLITE_SHARING_EXCLUSIVE_CONTEXT)
 			rContext->contexts = PCSCLITE_SHARING_NO_CONTEXT;
 		else
@@ -995,7 +993,6 @@ LONG SCardDisconnect(SCARDHANDLE hCard, DWORD dwDisposition)
 	 * Remove and destroy this handle
 	 */
 	(void)RFRemoveReaderHandle(rContext, hCard);
-	(void)RFDestroyReaderHandle(hCard);
 
 	/*
 	 * For exclusive connection reset it to no connections

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