[Pcsclite-cvs-commit] PCSC/src readerfactory.c,1.17,1.18

sauveron-guest@quantz.debian.org sauveron-guest@quantz.debian.org
Thu, 11 Sep 2003 23:19:55 +0200


Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv14639/src

Modified Files:
	readerfactory.c 
Log Message:
Cleanup a condition unused and undo some of my previous changes.

Index: readerfactory.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/readerfactory.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- readerfactory.c	10 Sep 2003 09:47:14 -0000	1.17
+++ readerfactory.c	11 Sep 2003 21:19:53 -0000	1.18
@@ -42,7 +42,7 @@
 {
 
 	int i;   					/* Counter */
-	LONG rv;       				/* Return tester */
+	LONG rv; 					/* Return tester */
 
 	/*
 	 * Zero out everything 
@@ -171,8 +171,7 @@
 	/*
 	 * If a clone to this reader exists take some values from that clone 
 	 */
-	if (parentNode != -1 && parentNode < PCSCLITE_MAX_CONTEXTS
-		&& parentNode >= 0)
+	if (parentNode >= 0 && parentNode < PCSCLITE_MAX_CONTEXTS)
 	{
 		(sContexts[dwContext])->dwFeeds = 
 		  (sContexts[parentNode])->dwFeeds;
@@ -183,7 +182,7 @@
 		  (sContexts[parentNode])->mMutex;
 	}
 
-	if ((sContexts[dwContext])->dwFeeds == NULL)
+	if ((sContexts[dwContext])->dwFeeds == 0)
 	{
 		(sContexts[dwContext])->dwFeeds = 
 		  (DWORD *)malloc(sizeof(DWORD));
@@ -196,10 +195,10 @@
 		*(sContexts[dwContext])->dwFeeds = 1;
 	}
 
-	if ((sContexts[dwContext])->mMutex == NULL)
+	if ((sContexts[dwContext])->mMutex == 0)
 	{
 		(sContexts[dwContext])->mMutex =
-			(PCSCLITE_MUTEX_T) malloc(sizeof(PCSCLITE_MUTEX));
+		  (PCSCLITE_MUTEX_T) malloc(sizeof(PCSCLITE_MUTEX));
 		SYS_MutexInit((sContexts[dwContext])->mMutex);
 	}
 
@@ -478,8 +477,7 @@
 	LPSTR libraryName, DWORD dwPort, DWORD dwSlot)
 {
 
-	LONG rv;					/* rv is the reader number of the parent
-						 * of the clone */
+	LONG rv;	/* rv is the reader number of the parent of the clone */
 	LONG ret;
 	DWORD valueLength;
 	UCHAR tagValue;