[Pcsclite-cvs-commit] r2029 - trunk/PCSC/src

Ludovic Rousseau rousseau at costa.debian.org
Tue May 2 07:00:13 UTC 2006


Author: rousseau
Date: 2006-05-02 07:00:10 +0000 (Tue, 02 May 2006)
New Revision: 2029

Modified:
   trunk/PCSC/src/eventhandler.c
Log:
EHInitializeEventStructures(): check against MAP_FAILED instead of 0 for
the returned value of SYS_MemoryMap().

Thanks to Davide Rizzo for the bug report and patch


Modified: trunk/PCSC/src/eventhandler.c
===================================================================
--- trunk/PCSC/src/eventhandler.c	2006-05-02 06:58:07 UTC (rev 2028)
+++ trunk/PCSC/src/eventhandler.c	2006-05-02 07:00:10 UTC (rev 2029)
@@ -76,7 +76,7 @@
 	{
 		readerStates[i] = (PREADER_STATE)
 			SYS_MemoryMap(sizeof(READER_STATE), fd, (i * pageSize));
-		if (readerStates[i] == 0)
+		if (readerStates[i] == MAP_FAILED)
 		{
 			Log3(PCSC_LOG_CRITICAL, "Cannot memory map public shared file %s: %s",
 				PCSCLITE_PUBSHM_FILE, strerror(errno));




More information about the Pcsclite-cvs-commit mailing list