wininet: Use list_head get first entry of list.

Sebastian Lackner sebastian at fds-team.de
Wed Jul 6 22:39:46 CDT 2016


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---

Using list_head() is probably more clear for the purpose of getting the
first element, or is there a specific reason why the longer version is
used in those cases?

 dlls/wininet/cookie.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c
index 5421fe1..5da9710 100644
--- a/dlls/wininet/cookie.c
+++ b/dlls/wininet/cookie.c
@@ -690,15 +690,15 @@ static void free_cookie_domain_list(struct list *list)
     cookie_domain_t *domain;
 
     while(!list_empty(list)) {
-        domain = LIST_ENTRY(list_next(list, list), cookie_domain_t, entry);
+        domain = LIST_ENTRY(list_head(list), cookie_domain_t, entry);
 
         free_cookie_domain_list(&domain->subdomain_list);
 
         while(!list_empty(&domain->path_list)) {
-            container = LIST_ENTRY(list_next(&domain->path_list, &domain->path_list), cookie_container_t, entry);
+            container = LIST_ENTRY(list_head(&domain->path_list), cookie_container_t, entry);
 
             while(!list_empty(&container->cookie_list))
-                delete_cookie(LIST_ENTRY(list_next(&container->cookie_list, &container->cookie_list), cookie_t, entry));
+                delete_cookie(LIST_ENTRY(list_head(&container->cookie_list), cookie_t, entry));
 
             heap_free(container->cookie_url);
             list_remove(&container->entry);
-- 
2.8.0



More information about the wine-patches mailing list