Nikolay Sivov : crypt32: Use regular list iterator when there' s no need for safe one.

Alexandre Julliard julliard at winehq.org
Thu Jul 7 09:48:23 CDT 2016


Module: wine
Branch: master
Commit: 94b6a885a880728f5e0a865fc17a82532723e756
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=94b6a885a880728f5e0a865fc17a82532723e756

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Jul  6 23:34:20 2016 +0300

crypt32: Use regular list iterator when there's no need for safe one.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/crypt32/collectionstore.c | 9 ++++-----
 dlls/crypt32/proplist.c        | 5 ++---
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/dlls/crypt32/collectionstore.c b/dlls/crypt32/collectionstore.c
index f565745..8b90270 100644
--- a/dlls/crypt32/collectionstore.c
+++ b/dlls/crypt32/collectionstore.c
@@ -114,10 +114,10 @@ static BOOL CRYPT_CollectionAddContext(WINE_COLLECTIONSTORE *store,
     }
     else
     {
-        WINE_STORE_LIST_ENTRY *entry, *next;
+        WINE_STORE_LIST_ENTRY *entry;
 
         EnterCriticalSection(&store->cs);
-        LIST_FOR_EACH_ENTRY_SAFE(entry, next, &store->stores, WINE_STORE_LIST_ENTRY, entry)
+        LIST_FOR_EACH_ENTRY(entry, &store->stores, WINE_STORE_LIST_ENTRY, entry)
         {
             if (entry->dwUpdateFlags & CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG)
             {
@@ -559,7 +559,7 @@ void WINAPI CertRemoveStoreFromCollection(HCERTSTORE hCollectionStore,
 {
     WINE_COLLECTIONSTORE *collection = hCollectionStore;
     WINECRYPT_CERTSTORE *sibling = hSiblingStore;
-    WINE_STORE_LIST_ENTRY *store, *next;
+    WINE_STORE_LIST_ENTRY *store;
 
     TRACE("(%p, %p)\n", hCollectionStore, hSiblingStore);
 
@@ -578,8 +578,7 @@ void WINAPI CertRemoveStoreFromCollection(HCERTSTORE hCollectionStore,
         return;
     }
     EnterCriticalSection(&collection->cs);
-    LIST_FOR_EACH_ENTRY_SAFE(store, next, &collection->stores,
-     WINE_STORE_LIST_ENTRY, entry)
+    LIST_FOR_EACH_ENTRY(store, &collection->stores, WINE_STORE_LIST_ENTRY, entry)
     {
         if (store->store == sibling)
         {
diff --git a/dlls/crypt32/proplist.c b/dlls/crypt32/proplist.c
index d849fd6..f5ae221 100644
--- a/dlls/crypt32/proplist.c
+++ b/dlls/crypt32/proplist.c
@@ -148,11 +148,10 @@ BOOL ContextPropertyList_SetProperty(CONTEXT_PROPERTY_LIST *list, DWORD id,
 
 void ContextPropertyList_RemoveProperty(CONTEXT_PROPERTY_LIST *list, DWORD id)
 {
-    CONTEXT_PROPERTY *prop, *next;
+    CONTEXT_PROPERTY *prop;
 
     EnterCriticalSection(&list->cs);
-    LIST_FOR_EACH_ENTRY_SAFE(prop, next, &list->properties, CONTEXT_PROPERTY,
-     entry)
+    LIST_FOR_EACH_ENTRY(prop, &list->properties, CONTEXT_PROPERTY, entry)
     {
         if (prop->propID == id)
         {




More information about the wine-cvs mailing list