[Pcsclite-cvs-commit] r6444 - in /trunk/PCSC/src: readerfactory.c winscard_clnt.c winscard_svc.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Aug 24 08:10:23 UTC 2012
Author: rousseau
Date: Fri Aug 24 08:10:23 2012
New Revision: 6444
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6444
Log:
Remove useless parenthesis
Replace the constructions &(structure->field) by &structure->field since
that is equivalent.
Modified:
trunk/PCSC/src/readerfactory.c
trunk/PCSC/src/winscard_clnt.c
trunk/PCSC/src/winscard_svc.c
Modified: trunk/PCSC/src/readerfactory.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/readerfactory.c?rev=6444&op=diff
==============================================================================
--- trunk/PCSC/src/readerfactory.c (original)
+++ trunk/PCSC/src/readerfactory.c Fri Aug 24 08:10:23 2012
@@ -587,13 +587,13 @@
sContext->vHandle = NULL;
(void)pthread_mutex_lock(&sContext->handlesList_lock);
- while (list_size(&(sContext->handlesList)) != 0)
+ while (list_size(&sContext->handlesList) != 0)
{
int lrv;
RDR_CLIHANDLES *currentHandle;
- currentHandle = list_get_at(&(sContext->handlesList), 0);
- lrv = list_delete_at(&(sContext->handlesList), 0);
+ currentHandle = list_get_at(&sContext->handlesList, 0);
+ lrv = list_delete_at(&sContext->handlesList, 0);
if (lrv < 0)
Log2(PCSC_LOG_CRITICAL,
"list_delete_at failed with return value: %d", lrv);
@@ -602,7 +602,7 @@
}
(void)pthread_mutex_unlock(&sContext->handlesList_lock);
(void)pthread_mutex_destroy(&sContext->handlesList_lock);
- list_destroy(&(sContext->handlesList));
+ list_destroy(&sContext->handlesList);
dwNumReadersContexts -= 1;
/* signal an event to clients */
@@ -1089,7 +1089,7 @@
LONG rv = SCARD_S_SUCCESS;
(void)pthread_mutex_lock(&rContext->handlesList_lock);
- listLength = list_size(&(rContext->handlesList));
+ listLength = list_size(&rContext->handlesList);
/* Throttle the number of possible handles */
if (listLength >= maxReaderHandles)
@@ -1112,7 +1112,7 @@
newHandle->hCard = hCard;
newHandle->dwEventStatus = 0;
- lrv = list_append(&(rContext->handlesList), newHandle);
+ lrv = list_append(&rContext->handlesList, newHandle);
if (lrv < 0)
{
free(newHandle);
@@ -1132,7 +1132,7 @@
LONG rv = SCARD_S_SUCCESS;
(void)pthread_mutex_lock(&rContext->handlesList_lock);
- currentHandle = list_seek(&(rContext->handlesList), &hCard);
+ currentHandle = list_seek(&rContext->handlesList, &hCard);
if (NULL == currentHandle)
{
Log2(PCSC_LOG_CRITICAL, "list_seek failed to locate hCard=%lX", hCard);
@@ -1140,7 +1140,7 @@
goto end;
}
- lrv = list_delete(&(rContext->handlesList), currentHandle);
+ lrv = list_delete(&rContext->handlesList, currentHandle);
if (lrv < 0)
Log2(PCSC_LOG_CRITICAL,
"list_delete failed with return value: %d", lrv);
@@ -1161,11 +1161,11 @@
RDR_CLIHANDLES *currentHandle;
(void)pthread_mutex_lock(&rContext->handlesList_lock);
- listSize = list_size(&(rContext->handlesList));
+ listSize = list_size(&rContext->handlesList);
for (list_index = 0; list_index < listSize; list_index++)
{
- currentHandle = list_get_at(&(rContext->handlesList), list_index);
+ currentHandle = list_get_at(&rContext->handlesList, list_index);
if (NULL == currentHandle)
{
Log2(PCSC_LOG_CRITICAL, "list_get_at failed at index %d",
@@ -1193,7 +1193,7 @@
RDR_CLIHANDLES *currentHandle;
(void)pthread_mutex_lock(&rContext->handlesList_lock);
- currentHandle = list_seek(&(rContext->handlesList), &hCard);
+ currentHandle = list_seek(&rContext->handlesList, &hCard);
(void)pthread_mutex_unlock(&rContext->handlesList_lock);
if (NULL == currentHandle)
{
@@ -1228,7 +1228,7 @@
RDR_CLIHANDLES *currentHandle;
(void)pthread_mutex_lock(&rContext->handlesList_lock);
- currentHandle = list_seek(&(rContext->handlesList), &hCard);
+ currentHandle = list_seek(&rContext->handlesList, &hCard);
(void)pthread_mutex_unlock(&rContext->handlesList_lock);
if (NULL == currentHandle)
/* Not Found */
Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=6444&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Fri Aug 24 08:10:23 2012
@@ -3307,20 +3307,20 @@
}
(void)pthread_mutex_init(newContextMap->mMutex, NULL);
- lrv = list_init(&(newContextMap->channelMapList));
+ lrv = list_init(&newContextMap->channelMapList);
if (lrv < 0)
{
Log2(PCSC_LOG_CRITICAL, "list_init failed with return value: %d", lrv);
goto error;
}
- lrv = list_attributes_seeker(&(newContextMap->channelMapList),
+ lrv = list_attributes_seeker(&newContextMap->channelMapList,
CHANNEL_MAP_seeker);
if (lrv <0)
{
Log2(PCSC_LOG_CRITICAL,
"list_attributes_seeker failed with return value: %d", lrv);
- list_destroy(&(newContextMap->channelMapList));
+ list_destroy(&newContextMap->channelMapList);
goto error;
}
@@ -3329,7 +3329,7 @@
{
Log2(PCSC_LOG_CRITICAL, "list_append failed with return value: %d",
lrv);
- list_destroy(&(newContextMap->channelMapList));
+ list_destroy(&newContextMap->channelMapList);
goto error;
}
@@ -3417,10 +3417,10 @@
free(targetContextMap->mMutex);
targetContextMap->mMutex = NULL;
- listSize = list_size(&(targetContextMap->channelMapList));
+ listSize = list_size(&targetContextMap->channelMapList);
for (list_index = 0; list_index < listSize; list_index++)
{
- currentChannelMap = list_get_at(&(targetContextMap->channelMapList),
+ currentChannelMap = list_get_at(&targetContextMap->channelMapList,
list_index);
if (NULL == currentChannelMap)
{
@@ -3435,7 +3435,7 @@
}
}
- list_destroy(&(targetContextMap->channelMapList));
+ list_destroy(&targetContextMap->channelMapList);
lrv = list_delete(&contextMapList, targetContextMap);
if (lrv < 0)
@@ -3466,7 +3466,7 @@
newChannelMap->hCard = hCard;
newChannelMap->readerName = strdup(readerName);
- lrv = list_append(&(currentContextMap->channelMapList), newChannelMap);
+ lrv = list_append(¤tContextMap->channelMapList, newChannelMap);
if (lrv < 0)
{
free(newChannelMap->readerName);
@@ -3493,7 +3493,7 @@
free(currentChannelMap->readerName);
- lrv = list_delete(&(currentContextMap->channelMapList), currentChannelMap);
+ lrv = list_delete(¤tContextMap->channelMapList, currentChannelMap);
if (lrv < 0)
{
Log2(PCSC_LOG_CRITICAL,
@@ -3544,7 +3544,7 @@
list_index);
continue;
}
- currentChannelMap = list_seek(&(currentContextMap->channelMapList),
+ currentChannelMap = list_seek(¤tContextMap->channelMapList,
&hCard);
if (currentChannelMap != NULL)
{
Modified: trunk/PCSC/src/winscard_svc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_svc.c?rev=6444&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_svc.c (original)
+++ trunk/PCSC/src/winscard_svc.c Fri Aug 24 08:10:23 2012
@@ -170,7 +170,7 @@
newContext->dwClientID = *pdwClientID;
/* Initialise the list of card contexts */
- lrv = list_init(&(newContext->cardsList));
+ lrv = list_init(&newContext->cardsList);
if (lrv < 0)
{
Log2(PCSC_LOG_CRITICAL, "list_init failed with return value: %d", lrv);
@@ -178,20 +178,20 @@
}
/* request to store copies, and provide the metric function */
- list_attributes_copy(&(newContext->cardsList), list_meter_int32_t, 1);
+ list_attributes_copy(&newContext->cardsList, list_meter_int32_t, 1);
/* Adding a comparator
* The stored type is SCARDHANDLE (long) but has only 32 bits
* usefull even on a 64-bit CPU since the API between pcscd and
* libpcscliter uses "int32_t hCard;"
*/
- lrv = list_attributes_comparator(&(newContext->cardsList),
+ lrv = list_attributes_comparator(&newContext->cardsList,
list_comparator_int32_t);
if (lrv != 0)
{
Log2(PCSC_LOG_CRITICAL,
"list_attributes_comparator failed with return value: %d", lrv);
- list_destroy(&(newContext->cardsList));
+ list_destroy(&newContext->cardsList);
goto out;
}
@@ -202,11 +202,11 @@
{
Log2(PCSC_LOG_CRITICAL, "list_append failed with return value: %d",
lrv);
- list_destroy(&(newContext->cardsList));
+ list_destroy(&newContext->cardsList);
goto out;
}
- rv = ThreadCreate(&(newContext->pthThread), THREAD_ATTR_DETACHED,
+ rv = ThreadCreate(&newContext->pthThread, THREAD_ATTR_DETACHED,
(PCSCLITE_THREAD_FUNCTION( )) ContextThread, (LPVOID) newContext);
if (rv)
{
@@ -216,7 +216,7 @@
lrv2 = list_delete(&contextsList, newContext);
if (lrv2 < 0)
Log2(PCSC_LOG_CRITICAL, "list_delete failed with error %d", lrv2);
- list_destroy(&(newContext->cardsList));
+ list_destroy(&newContext->cardsList);
goto out;
}
@@ -529,7 +529,7 @@
/* find the client */
(void)pthread_mutex_lock(&contextsList_lock);
psTargetContext = (SCONTEXT *) list_seek(&contextsList,
- &(caStr.hContext));
+ &caStr.hContext);
(void)pthread_mutex_unlock(&contextsList_lock);
if (psTargetContext != NULL)
{
@@ -753,7 +753,7 @@
return SCARD_E_INVALID_VALUE;
(void)pthread_mutex_lock(&threadContext->cardsList_lock);
- while (list_size(&(threadContext->cardsList)) != 0)
+ while (list_size(&threadContext->cardsList) != 0)
{
READER_CONTEXT * rContext = NULL;
SCARDHANDLE hCard, hLockId;
@@ -762,7 +762,7 @@
/*
* Disconnect each of these just in case
*/
- ptr = list_get_at(&(threadContext->cardsList), 0);
+ ptr = list_get_at(&threadContext->cardsList, 0);
if (NULL == ptr)
{
Log1(PCSC_LOG_CRITICAL, "list_get_at failed");
@@ -807,13 +807,13 @@
(void)SCardDisconnect(hCard, SCARD_RESET_CARD);
/* Remove entry from the list */
- lrv = list_delete_at(&(threadContext->cardsList), 0);
+ lrv = list_delete_at(&threadContext->cardsList, 0);
if (lrv < 0)
Log2(PCSC_LOG_CRITICAL,
"list_delete_at failed with return value: %d", lrv);
}
(void)pthread_mutex_unlock(&threadContext->cardsList_lock);
- list_destroy(&(threadContext->cardsList));
+ list_destroy(&threadContext->cardsList);
/* We only mark the context as no longer in use.
* The memory is freed in MSGCleanupCLient() */
@@ -836,7 +836,7 @@
(void)pthread_mutex_lock(&threadContext->cardsList_lock);
- listLength = list_size(&(threadContext->cardsList));
+ listLength = list_size(&threadContext->cardsList);
if (listLength >= contextMaxCardHandles)
{
Log4(PCSC_LOG_DEBUG,
@@ -847,7 +847,7 @@
}
else
{
- lrv = list_append(&(threadContext->cardsList), &hCard);
+ lrv = list_append(&threadContext->cardsList, &hCard);
if (lrv < 0)
{
Log2(PCSC_LOG_CRITICAL,
@@ -868,7 +868,7 @@
int lrv;
(void)pthread_mutex_lock(&threadContext->cardsList_lock);
- lrv = list_delete(&(threadContext->cardsList), &hCard);
+ lrv = list_delete(&threadContext->cardsList, &hCard);
(void)pthread_mutex_unlock(&threadContext->cardsList_lock);
if (lrv < 0)
{
@@ -894,7 +894,7 @@
}
(void)pthread_mutex_lock(&threadContext->cardsList_lock);
- list_index = list_locate(&(threadContext->cardsList), &hCard);
+ list_index = list_locate(&threadContext->cardsList, &hCard);
(void)pthread_mutex_unlock(&threadContext->cardsList_lock);
if (list_index >= 0)
return 0;
More information about the Pcsclite-cvs-commit
mailing list