Vincent Povirk : wininet: Use LIST_FOR_EACH_SAFE in a loop where we can delete an entry.

Alexandre Julliard julliard at winehq.org
Mon Jan 17 10:59:41 CST 2011


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Fri Jan 14 16:39:57 2011 -0600

wininet: Use LIST_FOR_EACH_SAFE in a loop where we can delete an entry.

---

 dlls/wininet/cookie.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c
index 7dfd2a8..157ee8d 100644
--- a/dlls/wininet/cookie.c
+++ b/dlls/wininet/cookie.c
@@ -302,11 +302,11 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
         cookie_domain *cookiesDomain = LIST_ENTRY(cursor, cookie_domain, entry);
         if (COOKIE_matchDomain(hostName, path, cookiesDomain, TRUE))
         {
-            struct list * cursor;
+            struct list * cursor, * cursor2;
             domain_count++;
             TRACE("found domain %p\n", cookiesDomain);
     
-            LIST_FOR_EACH(cursor, &cookiesDomain->cookie_list)
+            LIST_FOR_EACH_SAFE(cursor, cursor2, &cookiesDomain->cookie_list)
             {
                 cookie *thisCookie = LIST_ENTRY(cursor, cookie, entry);
                 /* check for expiry */




More information about the wine-cvs mailing list