[Pcsclite-git-commit] [PCSC] 05/16: EHSignalEventToClients() returns void now

Ludovic Rousseau rousseau at moszumanska.debian.org
Thu May 11 16:26:03 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 c5881b330443d5ed64307b580310d93a13e66aab
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu May 11 14:38:12 2017 +0200

    EHSignalEventToClients() returns void now
    
    The value returned by EHSignalEventToClients() was ignored.
    Now the EHSignalEventToClients() function returns void.
---
 src/eventhandler.c  | 17 +++++++----------
 src/eventhandler.h  |  2 +-
 src/readerfactory.c |  2 +-
 3 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/eventhandler.c b/src/eventhandler.c
index 4901dbc..d407453 100644
--- a/src/eventhandler.c
+++ b/src/eventhandler.c
@@ -111,9 +111,8 @@ LONG EHUnregisterClientForEvent(int32_t filedes)
 /**
  * Sends an asynchronous event to any waiting client
  */
-LONG EHSignalEventToClients(void)
+void EHSignalEventToClients(void)
 {
-	LONG rv = SCARD_S_SUCCESS;
 	int32_t filedes;
 
 	(void)pthread_mutex_lock(&ClientsWaitingForEvent_lock);
@@ -122,15 +121,13 @@ LONG EHSignalEventToClients(void)
 	while (list_iterator_hasnext(&ClientsWaitingForEvent))
 	{
         filedes = *(int32_t *)list_iterator_next(&ClientsWaitingForEvent);
-		rv = MSGSignalClient(filedes, SCARD_S_SUCCESS);
+		MSGSignalClient(filedes, SCARD_S_SUCCESS);
 	}
 	(void)list_iterator_stop(&ClientsWaitingForEvent);
 
 	(void)list_clear(&ClientsWaitingForEvent);
 
 	(void)pthread_mutex_unlock(&ClientsWaitingForEvent_lock);
-
-	return rv;
 } /* EHSignalEventToClients */
 
 LONG EHInitializeEventStructures(void)
@@ -324,7 +321,7 @@ static void EHStatusHandlerThread(READER_CONTEXT * rContext)
 	rContext->readerState->readerState = readerState;
 	rContext->readerState->readerSharing = readerSharing = rContext->contexts;
 
-	(void)EHSignalEventToClients();
+	EHSignalEventToClients();
 
 	while (1)
 	{
@@ -345,7 +342,7 @@ static void EHStatusHandlerThread(READER_CONTEXT * rContext)
 
 			dwCurrentState = SCARD_UNKNOWN;
 
-			(void)EHSignalEventToClients();
+			EHSignalEventToClients();
 		}
 
 		if (dwStatus & SCARD_ABSENT)
@@ -371,7 +368,7 @@ static void EHStatusHandlerThread(READER_CONTEXT * rContext)
 				if (rContext->readerState->eventCounter > 0xFFFF)
 					rContext->readerState->eventCounter = 0;
 
-				(void)EHSignalEventToClients();
+				EHSignalEventToClients();
 			}
 
 		}
@@ -423,7 +420,7 @@ static void EHStatusHandlerThread(READER_CONTEXT * rContext)
 
 				Log2(PCSC_LOG_INFO, "Card inserted into %s", readerName);
 
-				(void)EHSignalEventToClients();
+				EHSignalEventToClients();
 
 				if (rv == IFD_SUCCESS)
 				{
@@ -448,7 +445,7 @@ static void EHStatusHandlerThread(READER_CONTEXT * rContext)
 		{
 			readerSharing = rContext->contexts;
 			rContext->readerState->readerSharing = readerSharing;
-			(void)EHSignalEventToClients();
+			EHSignalEventToClients();
 		}
 
 		if (rContext->pthCardEvent)
diff --git a/src/eventhandler.h b/src/eventhandler.h
index e459e91..373461a 100644
--- a/src/eventhandler.h
+++ b/src/eventhandler.h
@@ -61,7 +61,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 	LONG EHTryToUnregisterClientForEvent(int32_t filedes);
 	LONG EHRegisterClientForEvent(int32_t filedes);
 	LONG EHUnregisterClientForEvent(int32_t filedes);
-	LONG EHSignalEventToClients(void);
+	void EHSignalEventToClients(void);
 	LONG EHInitializeEventStructures(void);
 	LONG EHDeinitializeEventStructures(void);
 	LONG EHSpawnEventHandler(READER_CONTEXT *);
diff --git a/src/readerfactory.c b/src/readerfactory.c
index b4e1f2c..786d0d9 100644
--- a/src/readerfactory.c
+++ b/src/readerfactory.c
@@ -680,7 +680,7 @@ LONG removeReader(READER_CONTEXT * sContext)
 	dwNumReadersContexts -= 1;
 
 	/* signal an event to clients */
-	(void)EHSignalEventToClients();
+	EHSignalEventToClients();
 
 	return SCARD_S_SUCCESS;
 }

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