From: Matteo Bruni Subject: [PATCH 4/5] wined3d: Replace an open-coded implementation of LIST_FOR_EACH_ENTRY_SAFE. Message-Id: <1434665262-354-4-git-send-email-mbruni@codeweavers.com> Date: Fri, 19 Jun 2015 00:07:41 +0200 --- dlls/wined3d/shader.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 5b32528..9ed1616 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -409,16 +409,10 @@ static unsigned int shader_get_float_offset(enum wined3d_shader_register_type re static void shader_delete_constant_list(struct list *clist) { - struct wined3d_shader_lconst *constant; - struct list *ptr; + struct wined3d_shader_lconst *constant, *constant_next; - ptr = list_head(clist); - while (ptr) - { - constant = LIST_ENTRY(ptr, struct wined3d_shader_lconst, entry); - ptr = list_next(clist, ptr); + LIST_FOR_EACH_ENTRY_SAFE(constant, constant_next, clist, struct wined3d_shader_lconst, entry) HeapFree(GetProcessHeap(), 0, constant); - } list_init(clist); } -- 2.3.6